Skip to content

Commit 084fec3

Browse files
committed
chore(docker-go-dev): add envtpl
1 parent 5797fc2 commit 084fec3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

rootfs/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM golang:1.15
22

33
LABEL name="drycc-go-dev"
44

5+
ENV ENVTPL_VERSION=v1.0.0
56
ENV GOLANGCI_LINT_VERSION=v1.29.0
67

78
# This is a huge one-liner to optimize the Docker image layer.
@@ -48,6 +49,12 @@ RUN export DEBIAN_FRONTEND=noninteractive \
4849
github.com/axw/gocov/gocov \
4950
github.com/mitchellh/gox \
5051
golang.org/x/lint \
52+
&& git clone --dept 1 -b $ENVTPL_VERSION https://github.com/subfuzion/envtpl $GOPATH/src/github.com/subfuzion/envtpl \
53+
&& cd $GOPATH/src/github.com/subfuzion/envtpl \
54+
&& export GO111MODULE=on \
55+
&& CGO_ENABLED=0 go build \
56+
-ldflags "-X main.AppVersionMetadata=$(date -u +%s)" \
57+
-a -installsuffix cgo -o /bin/envtpl ./cmd/envtpl/. \
5158
&& curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin $GOLANGCI_LINT_VERSION \
5259
&& apt-get autoremove -y \
5360
&& apt-get clean -y \

0 commit comments

Comments
 (0)