added ability to debug the ocis in a docker compose stack via delve

This commit is contained in:
Roman Perekhod
2024-01-31 17:59:00 +01:00
parent c37ef2b62b
commit f1ccaa7e98
5 changed files with 112 additions and 0 deletions
+12
View File
@@ -107,3 +107,15 @@ $(BIN)/$(EXECUTABLE)-debug: $(SOURCES)
.PHONY: watch
watch: $(REFLEX)
$(REFLEX) -c reflex.conf
debug-linux-docker-amd64: release-dirs
GOOS=linux \
GOARCH=amd64 \
go build \
-gcflags="all=-N -l" \
-tags 'netgo $(TAGS)' \
-buildmode=exe \
-trimpath \
-ldflags '-extldflags "-static" $(DEBUG_LDFLAGS) $(DOCKER_LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-amd64' \
./cmd/$(NAME)