Codebase list golang-github-creack-pty / 6f6669a8-ed8a-4fa4-b78b-3363bd1fa181/main Dockerfile.golang
6f6669a8-ed8a-4fa4-b78b-3363bd1fa181/main

Tree @6f6669a8-ed8a-4fa4-b78b-3363bd1fa181/main (Download .tar.gz)

Dockerfile.golang @6f6669a8-ed8a-4fa4-b78b-3363bd1fa181/mainraw · history · blame

ARG GOVERSION=1.14
FROM golang:${GOVERSION}

# Set base env.
ARG GOOS=linux
ARG GOARCH=amd64
ENV GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 GOFLAGS='-v -ldflags=-s -ldflags=-w'

# Pre compile the stdlib for 386/arm (32bits).
RUN go build -a std

# Add the code to the image.
WORKDIR pty
ADD . .

# Build the lib.
RUN go build