github.com/cloudfoundry-attic/garden-linux@v0.333.2-candidate/packer/README.markdown (about)

     1  # Garden-Linux Packer
     2  
     3  Garden-Linux Packer is currently used to build Docker images / Vagrant boxes
     4  suitable for Garden-Linux development & testing.
     5  
     6  ## Pre-requisites for Mac
     7  
     8  * docker-machine version 0.5.1 and higher
     9  * Packer version v0.8.0 from homebrew (`brew install packer`) or
    10  [the site](https://www.packer.io/downloads.html)
    11  
    12  ## Building
    13  
    14  For some reason the default temp dir for packer has issues with the boot2docker
    15  vm. In order to build images you will need to export the `TMPDIR`. For
    16  instance, if you are using [direnv](http://direnv.net/) add this to a `.envrc`
    17  in the packer directory:
    18  
    19  ```bash
    20  export TMPDIR=~/.packer_tmp
    21  mkdir -p $TMPDIR
    22  ```
    23  
    24  ### Build everything
    25  
    26  Run `make ubuntu`. This will commit a docker image to your Docker server named
    27  `garden-ci-ubuntu:packer`.
    28  
    29  ## Releasing
    30  
    31  Update `garden-ci/version.json` with the desired version number.
    32  
    33  ### [DockerHub](https://hub.docker.com/)
    34  
    35  Ensure that you have the correct environment varibles set.
    36  
    37  ```bash
    38  export GARDEN_PACKER_DOCKER_USERNAME=<Docker user name>
    39  export GARDEN_PACKER_DOCKER_EMAIL=<Docker email>
    40  export GARDEN_PACKER_DOCKER_PASSWORD=<Docker password>
    41  ```
    42  
    43  Then run `make release-docker`. This will tag and upload the image to Docker
    44  Hub.