Dockerfile.golang 327 B

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