Packer: docker-import fails with "Unknown artifact type: packer.post-processor.docker-import"

Created on 13 May 2015  路  1Comment  路  Source: hashicorp/packer

Hello,

I am using the following simplified packer build configuration:

{
  "builders":
  [
    {
      "type": "docker",
      "image": "debian:wheezy",
      "commit": true
    }
  ],
    "post-processors": [
    {
      "type": "docker-import",
      "repository": "docker/snafu",
      "tag": "wheezy",
      "only": ["docker"]
    }
  ]
}

and am running into the following behaviour when I try to build the docker container:

$ packer build docker_snafu.json 
docker output will be in this color.

==> docker: Creating a temporary directory for sharing data...
==> docker: Pulling Docker image: debian:wheezy
    docker: wheezy: Pulling from debian
    docker: 21e4345e9035: Already exists
    docker: b3d362b23ec1: Already exists
    docker: b3d362b23ec1: Already exists
    docker: Digest: sha256:60c032bb8cf95b2401168283dcc4f3649e2f18c1c64e0a9e8957da931de62882
    docker: Status: Image is up to date for debian:wheezy
==> docker: Starting docker container...
    docker: Run command: docker run -v /tmp/packer-docker780415042:/packer-files -d -i -t debian:wheezy /bin/bash
    docker: Container ID: 0232a8fdbb927c1f3bda45b002c4ed9a54d1a229be0fe352341d943e86f10032
==> docker: Committing the container
    docker: Image ID: cdd61a8c3c6ce0363adf68f2a4ad574590664e9628624c53ccf25c9f1793817a
==> docker: Killing the container: 0232a8fdbb927c1f3bda45b002c4ed9a54d1a229be0fe352341d943e86f10032
==> docker: Running post-processor: docker-import
Build 'docker' errored: 1 error(s) occurred:

* Post-processor failed: Unknown artifact type: packer.post-processor.docker-import
Can only import from Docker builder artifacts.

==> Some builds didn't complete successfully and had errors:
--> docker: 1 error(s) occurred:

* Post-processor failed: Unknown artifact type: packer.post-processor.docker-import
Can only import from Docker builder artifacts.

==> Builds finished but no artifacts were created.

Am I using docker-import wrongly here or what might be the issue?

This is c8b3dff into which I cherry-picked https://github.com/mariussturm/packer/commit/3a286ab6bdba7b8e5bf6a43c357a0ffeacd3dc97

Most helpful comment

I should have used docker-tag rather than docker-import as I have commit: true according to https://www.packer.io/docs/builders/docker.html.

>All comments

I should have used docker-tag rather than docker-import as I have commit: true according to https://www.packer.io/docs/builders/docker.html.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nikoos picture Nikoos  路  3Comments

DanielBo picture DanielBo  路  3Comments

frezbo picture frezbo  路  3Comments

shashanksinha89 picture shashanksinha89  路  3Comments

s4mur4i picture s4mur4i  路  3Comments