README ¶ ARG SECRET=secret FROM golang:1.16.5-alpine ARG SECRET ENV GO111MODULE=auto GOPATH=/go WORKDIR /go/application/ COPY . . RUN apk add --update git && \ rm -rf /var/cache/apk/*/apk/* && \ go mod init module && \ go mod tidy && \ go get ./... && \ go build -o /app . FROM alpine:3.10.3 COPY --from=0 /app /app ARG SECRET RUN echo $SECRET > /file CMD ["/app"] user@server:~/gocalc$ sudo docker build . -t dkr-15-gocalc user@server:~/gocalc$ sudo docker run 271a33cb9b4b cat /file secret Expand ▾ Collapse ▴ Documentation ¶ There is no documentation for this package. Source Files ¶ View all Source files main.go Click to show internal directories. Click to hide internal directories.