Dockerfile 2.77 KB
Newer Older
Yann DEGAT committed
1
FROM docker:1.11
Yann DEGAT committed
2 3

ENV TERRAFORM_VERSION 0.6.14
Yann DEGAT committed
4
ENV PACKER_VERSION 0.10.0
Yann DEGAT committed
5
ENV CFSSL_VERSION R1.2
Yann DEGAT committed
6 7 8 9

#update
RUN set -ex \
    && apk update \
Yann DEGAT committed
10
    && apk add --no-cache --virtual .fetch-deps curl gnupg git openssh-client py-pip jq make bash util-linux gpgme \
Yann DEGAT committed
11 12 13 14 15 16 17
    && pip install docker-compose awscli \
    && wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/local/bin \
    && wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip \
    && unzip packer_${PACKER_VERSION}_linux_amd64.zip -d /usr/local/bin \
    && mkdir $HOME/.gnupg \
    && echo "pinentry-program /usr/bin/pinentry-tty" > $HOME/.gnupg/gpg-agent.conf \
Yann DEGAT committed
18 19
    && curl https://pkg.cfssl.org/${CFSSL_VERSION}/cfssl_linux-amd64 > /usr/local/bin/cfssl \
    && curl https://pkg.cfssl.org/${CFSSL_VERSION}/cfssljson_linux-amd64 > /usr/local/bin/cfssljson \
Yann DEGAT committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
    && rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip packer_${PACKER_VERSION}_linux_amd64.zip \
    /usr/local/bin/terraform-provider-atlas \
    /usr/local/bin/terraform-provider-azure \
    /usr/local/bin/terraform-provider-azurerm \
    /usr/local/bin/terraform-provider-chef \
    /usr/local/bin/terraform-provider-cloudflare \
    /usr/local/bin/terraform-provider-cloudstack \
    /usr/local/bin/terraform-provider-consul \
    /usr/local/bin/terraform-provider-digitalocean \
    /usr/local/bin/terraform-provider-dme \
    /usr/local/bin/terraform-provider-dnsimple \
    /usr/local/bin/terraform-provider-docker \
    /usr/local/bin/terraform-provider-dyn \
    /usr/local/bin/terraform-provider-google \
    /usr/local/bin/terraform-provider-heroku \
    /usr/local/bin/terraform-provider-mailgun \
    /usr/local/bin/terraform-provider-mysql \
    /usr/local/bin/terraform-provider-openstack \
    /usr/local/bin/terraform-provider-packet \
    /usr/local/bin/terraform-provider-postgresql \
    /usr/local/bin/terraform-provider-powerdns \
    /usr/local/bin/terraform-provider-rundeck \
    /usr/local/bin/terraform-provider-statuscake \
    /usr/local/bin/terraform-provider-template \
    /usr/local/bin/terraform-provider-tls \
    /usr/local/bin/terraform-provider-vcd \
    /usr/local/bin/terraform-provider-vsphere \
    /usr/local/bin/terraform-provisioner-chef

Yann DEGAT committed
49 50
RUN ln -s /usr/local/bin/packer /usr/local/bin/packer-io \
   && chmod +x /usr/local/bin/cfssl /usr/local/bin/cfssljson
Yann DEGAT committed
51 52 53 54 55 56 57 58 59 60 61 62

ENV AWS_ACCESS_KEY_ID "your aws access key"
ENV AWS_SECRET_ACCESS_KEY "your aws secret access key"
ENV AWS_DEFAULT_REGION "your aws default region"
ENV STACK_NAME "The Name of your stack"
ENV AWS_ACCOUNT "The ID of your AWS Account"
ENV KEYPAIR_PASSPHRASE "The passphrase of your keypair"

ADD . /src
WORKDIR /src

ENTRYPOINT ["/bin/bash"]