2019-08-12 13:30:47 +00:00
|
|
|
FROM circleci/golang:1.12.7
|
2019-01-31 13:31:10 +00:00
|
|
|
ENV PROTOC_VERSION 3.6.1
|
|
|
|
ENV VAULT_VERSION 1.1.0
|
|
|
|
ENV CONSUL_VERSION 1.4.0
|
|
|
|
|
|
|
|
RUN sudo apt-get update \
|
|
|
|
&& sudo apt-get -y upgrade \
|
|
|
|
&& sudo apt-get install -y unzip \
|
|
|
|
&& sudo rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2019-08-12 13:30:47 +00:00
|
|
|
## Add the git repo and run bootstrap to install CI dependencies, then remove
|
|
|
|
## the extra checkout to save image size.
|
|
|
|
COPY . /tmp/build
|
|
|
|
RUN cd /tmp/build && sudo chown -R $(whoami) /tmp/build && make bootstrap && rm -rf /tmp/build
|
2019-01-31 13:31:10 +00:00
|
|
|
|
|
|
|
RUN wget -q -O /tmp/protoc.zip https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \
|
|
|
|
&& unzip /tmp/protoc.zip -d /tmp/protoc3 \
|
|
|
|
&& sudo mv /tmp/protoc3/bin/* /usr/local/bin/ \
|
|
|
|
&& sudo mv /tmp/protoc3/include/* /usr/local/include/ \
|
|
|
|
&& sudo ln -s /usr/local/bin/protoc /usr/bin/protoc \
|
|
|
|
&& rm -rf /tmp/protoc*
|
|
|
|
|
|
|
|
RUN wget -q -O /tmp/vault.zip https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip \
|
|
|
|
&& sudo unzip -d /usr/local/bin /tmp/vault.zip \
|
|
|
|
&& rm -rf /tmp/vault*
|
|
|
|
|
|
|
|
RUN wget -q -O /tmp/consul.zip https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip \
|
|
|
|
&& sudo unzip -d /usr/local/bin /tmp/consul.zip \
|
|
|
|
&& rm -rf /tmp/consul*
|
|
|
|
|