Skip to content

Instantly share code, notes, and snippets.

@rogerwelin
Created November 25, 2020 22:18
Show Gist options
  • Save rogerwelin/aa68f419535e2d5ee12e82e8fb2a8084 to your computer and use it in GitHub Desktop.
Save rogerwelin/aa68f419535e2d5ee12e82e8fb2a8084 to your computer and use it in GitHub Desktop.
FROM golang:1.14 as build
ARG version
WORKDIR /build
COPY . .
RUN CGO_ENABLED=0 go build -ldflags "-X main.Version=$version"
FROM scratch
WORKDIR /app
EXPOSE 8080
COPY --from=build /build/hello-argocd-app .
CMD ["./hello-argocd-app"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment