-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Go debugger configuration consistent
- Loading branch information
1 parent
70cf197
commit 6f2634d
Showing
12 changed files
with
135 additions
and
105 deletions.
There are no files selected for viewing
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git i/Dockerfile w/Dockerfile | ||
index 3e08c61..ca3fcf9 100644 | ||
--- i/Dockerfile | ||
+++ w/Dockerfile | ||
@@ -9,6 +9,8 @@ ARG app_dir | ||
|
||
WORKDIR ${app_dir} | ||
|
||
+RUN go install github.com/go-delve/delve/cmd/dlv@latest | ||
+ | ||
RUN --mount=type=cache,target=/go/pkg/mod/ \ | ||
--mount=type=bind,source=go.sum,target=go.sum \ | ||
--mount=type=bind,source=go.mod,target=go.mod \ | ||
@@ -17,7 +19,7 @@ RUN --mount=type=cache,target=/go/pkg/mod/ \ | ||
COPY . . | ||
ARG BUILD_STRING=pretendo.pikmin3.docker | ||
RUN --mount=type=cache,target=/go/pkg/mod/ \ | ||
- CGO_ENABLED=0 go build -ldflags "-X 'main.serverBuildString=${BUILD_STRING}'" -v -o ${app_dir}/build/server | ||
+ CGO_ENABLED=0 go build -gcflags "all=-N -l" -ldflags "-X 'main.serverBuildString=${BUILD_STRING}'" -v -o ${app_dir}/build/server | ||
|
||
|
||
# * Running the final application | ||
@@ -33,4 +35,4 @@ USER go | ||
|
||
COPY --from=build ${app_dir}/build/server ${app_dir}/server | ||
|
||
-CMD [ "./server" ] | ||
+CMD ["./dlv", "exec", "./server", "--listen=:2345", "--headless", "--api-version=2", "--log", "--accept-multiclient", "--continue"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git i/Dockerfile w/Dockerfile | ||
index fb8db39..93b708b 100644 | ||
--- i/Dockerfile | ||
+++ w/Dockerfile | ||
@@ -9,6 +9,8 @@ ARG app_dir | ||
|
||
WORKDIR ${app_dir} | ||
|
||
+RUN go install github.com/go-delve/delve/cmd/dlv@latest | ||
+ | ||
RUN --mount=type=cache,target=/go/pkg/mod/ \ | ||
--mount=type=bind,source=go.sum,target=go.sum \ | ||
--mount=type=bind,source=go.mod,target=go.mod \ | ||
@@ -16,7 +18,7 @@ RUN --mount=type=cache,target=/go/pkg/mod/ \ | ||
|
||
COPY . . | ||
RUN --mount=type=cache,target=/go/pkg/mod/ \ | ||
- CGO_ENABLED=0 go build -v -o ${app_dir}/build/server | ||
+ CGO_ENABLED=0 go build -gcflags "all=-N -l" -v -o ${app_dir}/build/server | ||
|
||
|
||
# * Running the final application | ||
@@ -32,4 +34,4 @@ USER go | ||
|
||
COPY --from=build ${app_dir}/build/server ${app_dir}/server | ||
|
||
-CMD [ "./server" ] | ||
+CMD ["./dlv", "exec", "./server", "--listen=:2345", "--headless", "--api-version=2", "--log", "--accept-multiclient", "--continue"] |
This file was deleted.
Oops, something went wrong.
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
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
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