Created
June 18, 2017 16:40
-
-
Save dlsniper/890620182178e90323bb789a6f346021 to your computer and use it in GitHub Desktop.
Debug Dockerfile for Go applications
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
# build stage | |
FROM golang:1.8.3 AS build-env | |
ADD . /go/src/github.com/dlsniper/webinar | |
RUN go build -gcflags="-N -l" -o /webinar github.com/dlsniper/webinar | |
# final stage | |
FROM ubuntu:16.04 | |
WORKDIR / | |
COPY --from=build-env /webinar / | |
ADD dlv / | |
RUN chmod +x /dlv /webinar | |
EXPOSE 8000 40000 | |
CMD ["/dlv", "--listen=:40000", "--headless=true", "--api-version=2", "exec", "/webinar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment