github.com/dolfly/pty@v1.2.1/Dockerfile.golang (about) 1 ARG GOVERSION=1.14 2 FROM golang:${GOVERSION} 3 4 # Set base env. 5 ARG GOOS=linux 6 ARG GOARCH=amd64 7 ENV GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 GOFLAGS='-v -ldflags=-s -ldflags=-w' 8 9 # Pre compile the stdlib for 386/arm (32bits). 10 RUN go build -a std 11 12 # Add the code to the image. 13 WORKDIR pty 14 ADD . . 15 16 # Build the lib. 17 RUN go build