Created
March 29, 2020 12:59
-
-
Save WyriHaximus/512c8bf6cfcc038f09961d0d368eef43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.13-alpine3.11 AS build | |
RUN mkdir /opt/app | |
WORKDIR /opt/app | |
COPY dsmrp1.go /opt/app | |
# hadolint ignore=DL3018,DL3019 | |
RUN apk add git gcc musl-dev godep | |
ENV GOBIN /go/bin | |
ENV GO111MODULE on | |
WORKDIR /go | |
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-w' -o /dsmrp1 /opt/app/dsmrp1.go | |
### App | |
FROM scratch AS app | |
COPY --from=build /dsmrp1 /dsmrp1 | |
ENTRYPOINT ["/dsmrp1"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment