32 lines
1.3 KiB
Docker
32 lines
1.3 KiB
Docker
FROM circleci/golang:1.12.9
|
|
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/*
|
|
|
|
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*
|
|
|
|
## Add the git repo and run bootstrap to install CI dependencies, then remove
|
|
## the extra checkout to save image size.
|
|
COPY GNUmakefile /tmp/build/GNUmakefile
|
|
COPY scripts /tmp/build/scripts
|
|
RUN cd /tmp/build && sudo chown -R $(whoami) /tmp/build && make deps lint-deps && rm -rf /tmp/build
|
|
|