Page MenuHomeSolus

Initial inclusion of packer

Authored by mikechau on Jul 22 2018, 9:48 AM.


Group Reviewers
Triage Team
Maniphest Tasks
T6200: Packer
R4370:e5501e3f11f9: Initial inclusion of packer

Initial commit of packer, fixes T6200.

Test Plan
  • Created build template with docker builder, named as docker.json.
  • run packer validate docker.json to confirm template is valid.
  • run packer build docker.json

Diff Detail

R4370 packer
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mikechau created this revision.Jul 22 2018, 9:48 AM
mikechau requested review of this revision.Jul 22 2018, 9:48 AM

Config I used:


  "builders": [
      "type": "docker",
      "image": "ubuntu",
      "commit": true
  "provisioners": [
      "inline": [
        "echo hello"
      "type": "shell"

docker build docker.json output:

docker output will be in this color.

==> docker: Creating a temporary directory for sharing data...
==> docker: Pulling Docker image: ubuntu
    docker: Using default tag: latest
    docker: latest: Pulling from library/ubuntu
    docker: Digest: sha256:30e04ddada6eb09c12330c7df72cad1573916c7100168c34076808169ff6d805
    docker: Status: Image is up to date for ubuntu:latest
==> docker: Starting docker container...
    docker: Run command: docker run -v /home/mike/.packer.d/tmp/packer-docker164405582:/packer-files -d -i -t ubuntu /bin/bash
    docker: Container ID: bbb118b6d47278b0d1cb22dfcad4d88defa0667bd2ac42b8cdac974ac7e21681
==> docker: Provisioning with shell script: /tmp/packer-shell625042236
    docker: hello
==> docker: Committing the container
    docker: Image ID: sha256:955a4251f96c6198b27dd0a4fd36de4a0868f7351e0e115d0df8ce466ce83676
==> docker: Killing the container: bbb118b6d47278b0d1cb22dfcad4d88defa0667bd2ac42b8cdac974ac7e21681
Build 'docker' finished.

==> Builds finished. The artifacts of successful builds are:
--> docker: Imported Docker image: sha256:955a4251f96c6198b27dd0a4fd36de4a0868f7351e0e115d0df8ce466ce83676
DataDrake accepted this revision.Jul 25 2018, 11:38 AM
DataDrake added a subscriber: DataDrake.

LGTM. Thanks!

This revision is now accepted and ready to land.Jul 25 2018, 11:38 AM
This revision was automatically updated to reflect the committed changes.