1- FROM vault:1.6.0
1+ FROM vault:1.6.1
22LABEL maintainer="Corelight AWS Team <aws@corelight.com>"
33LABEL description="Serverless and Vault with Terraform for CI/CD"
44
5+ # RUN wget -O /root/go1.15.1.linux-amd64.tar.gz "https://dl.google.com/go/go1.15.1.linux-amd64.tar.gz" && \
6+ # tar -C /usr/local -xzf /root/go1.15.1.linux-amd64.tar.gz
7+ #
8+ # RUN ln -s /usr/local/bin/go /usr/bin/go
9+ # RUN ln -s /usr/local/bin/gofmt /usr/bin/gofmt
10+
11+ ARG GOLANG_VERSION=1.15.6
512
6- RUN wget --quiet https://releases.hashicorp.com/terraform/0.12.29/terraform_0.12.29_linux_amd64.zip \
7- && unzip terraform_0.12.29_linux_amd64.zip \
8- && mv terraform /usr/bin \
9- && rm terraform_0.12.29_linux_amd64.zip
1013
1114RUN apk add --no-cache --update git bash openssh make nodejs nodejs-npm jq
1215RUN npm install -g serverless@1.66 \
@@ -17,7 +20,23 @@ RUN npm install -g serverless@1.66 \
1720# Note: ignore "serverless update check failed" warning during "npm install"
1821
1922# Heavyweight considering we only use awscli for configuration, presently.
20- RUN apk add --no-cache --update python3 py-pip groff go && \
23+ RUN apk add --no-cache --update python3 py-pip groff && \
2124 pip install --upgrade awscli python-gitlab
2225
26+ RUN apk update && apk add go gcc bash musl-dev openssl-dev ca-certificates && update-ca-certificates
27+
28+ RUN wget https://dl.google.com/go/go$GOLANG_VERSION.src.tar.gz && tar -C /usr/local -xzf go$GOLANG_VERSION.src.tar.gz
29+
30+ RUN cd /usr/local/go/src && ./make.bash
31+
32+ RUN rm go$GOLANG_VERSION.src.tar.gz
33+
34+ # we delete the apk installed version to avoid conflict
35+ RUN apk del go
36+
37+ RUN go version
38+
39+ RUN ln -s /usr/local/go/bin/go /usr/bin/go
40+ RUN ln -s /usr/local/go/bin/gofmt/usr/bin/gofmt
41+
2342ENTRYPOINT ["/bin/bash" , "-l" , "-c" ]
0 commit comments