Skip to content

Instantly share code, notes, and snippets.

@billglover
Created November 1, 2018 10:41
Show Gist options
  • Save billglover/29fff1b4542a59e7d06fea35fe706710 to your computer and use it in GitHub Desktop.
Save billglover/29fff1b4542a59e7d06fea35fe706710 to your computer and use it in GitHub Desktop.
Dockerfile-arm
FROM golang:1.11.1-alpine as build
RUN apk add --update --no-cache ca-certificates git
RUN mkdir /app
WORKDIR /app
COPY . .
RUN GOOS=linux GOARCH=arm go build -a -installsuffix cgo -ldflags="-w -s" -o /go/bin/app
FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /go/bin/app /go/bin/app
ENTRYPOINT ["/go/bin/app"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment