Public Repository

Last pushed: a year ago
Short Description
Short description is empty for this repo.
Full Description

Dockerfile:

# This image holds all the dependencies needed to deploy life-api
# Run it with this (from the docker/ directory):
# docker run --rm -it -v $PWD:/life-env -v ~/.aws:/root/.aws -v ~/.ssh/:/root/.ssh -e GITHUB_PRIVATE_KEY_PATH=/root/.ssh/id_rsa -e DEPLOY_ENV=dev life-api-deploy /bin/bash
# OR
# docker run \
# --rm -it \
# -v $SCRIPT_DIR:/life-env \
# -v ~/.aws:/root/.aws \
# -v ~/.ssh/:/root/.ssh \
# -e GITHUB_PRIVATE_KEY_PATH=/root/.ssh/id_api-checkout-key \
# -e DEPLOY_ENV=dev \
# -e CIRCLE_SHA1=$CIRCLE_SHA1 \
# -e CI=true \
# -e CIRCLE_PROJECT_REPONAME=$CIRCLE_PROJECT_REPONAME \
# givery/life-api-deploy
FROM ubuntu:14.04

# Install curl and git
RUN apt-get -qq update \
    && apt-get install -y curl git make unzip nodejs npm \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Install node 4.4.7
RUN npm install -g n
RUN n 4.4.7

# Install Go
RUN curl -o /usr/local/go.tar.gz https://storage.googleapis.com/golang/go1.6.3.linux-amd64.tar.gz \
    && tar -C /usr/local -xzf /usr/local/go.tar.gz \
    && rm /usr/local/go.tar.gz

# Put go executable on PATH
ENV PATH=$PATH:/usr/local/go/bin

# Create a gopath
RUN mkdir /root/gopath

# Set up GOPATH variable
ENV GOPATH=/root/gopath
ENV PATH=$PATH:$GOPATH/bin

# Install latest Terraform
RUN git clone https://github.com/hashicorp/terraform.git $GOPATH/src/github.com/hashicorp/terraform \
    && cd $GOPATH/src/github.com/hashicorp/terraform \
    && make tools \
    && make fmt \
    && make dev \
    && cp $GOPATH/bin/terraform /usr/bin/ \
    && rm -rf $GOPATH

# Install Packer
RUN curl -o packer.zip https://releases.hashicorp.com/packer/0.10.0/packer_0.10.0_linux_amd64.zip \
    && unzip packer.zip \
    && mv packer /usr/bin/ \
    && rm packer.zip

# Volume to share the life-env repo
VOLUME /life-env
WORKDIR /life-env

# Volume for host to share AWS credentials
VOLUME /root/.aws

# Volume for host to share SSH key for checking out life-api
VOLUME /root/.ssh

CMD node /life-env/ops/infra/buildInfra.js
Docker Pull Command
Owner
givery