mirror of
https://github.com/SourceFellows/gobuch.git
synced 2025-08-05 14:12:16 +02:00
initial import
This commit is contained in:
29
cloud-provider/google-cloud-hello/Dockerfile
Normal file
29
cloud-provider/google-cloud-hello/Dockerfile
Normal file
@ -0,0 +1,29 @@
|
||||
# Use base golang image from Docker Hub
|
||||
FROM golang:1.14
|
||||
|
||||
# Download the dlv (delve) debugger for go (you can comment this out if unused)
|
||||
RUN go get -u -v github.com/go-delve/delve/cmd/dlv
|
||||
|
||||
WORKDIR /src/hello-world
|
||||
|
||||
# Install dependencies in go.mod and go.sum
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
# Copy rest of the application source code
|
||||
COPY . ./
|
||||
|
||||
# Compile the application to /app.
|
||||
RUN go build -o /app -v ./cmd/hello-world
|
||||
|
||||
# If you want to use the debugger, you need to modify the entrypoint to the
|
||||
# container and point it to the "dlv debug" command:
|
||||
# * UNCOMMENT the following ENTRYPOINT statement,
|
||||
# * COMMENT OUT the last ENTRYPOINT statement
|
||||
# Start the "dlv debug" server on port 3000 of the container.
|
||||
ENTRYPOINT ["dlv", "exec", "/app", "--continue", "--accept-multiclient", "--api-version=2", "--headless", "--listen=:3000", "--log"]
|
||||
|
||||
# If you want to run WITHOUT the debugging server:
|
||||
# * COMMENT OUT the previous ENTRYPOINT statements,
|
||||
# * UNCOMMENT the following ENTRYPOINT statement.
|
||||
# ENTRYPOINT ["/app"]
|
Reference in New Issue
Block a user