Skip to content

Commit

Permalink
Fix debug docker-compose setup (#1529)
Browse files Browse the repository at this point in the history
- Update dlv version to be compatible with Go 1.21
- Add required flag --ca to fulcio command
- Switch from "command" to "entrypoint" to override the ENTRYPOINT in
  the Dockerfile
- Use ports consistent with the main docker-compose file to avoid
  conflicting with rekor
- Use metrics port environment variable which was missed in ca33c98

Signed-off-by: Colleen Murphy <colleenmurphy@google.com>
  • Loading branch information
cmurphy committed Jan 19, 2024
1 parent e4ff84f commit f2a8d1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ENTRYPOINT ["/usr/local/bin/fulcio-server", "serve"]

# debug compile options & debugger
FROM deploy as debug
RUN go install github.com/go-delve/delve/cmd/dlv@v1.8.0
RUN go install github.com/go-delve/delve/cmd/dlv@v1.22.0

# overwrite server and include debugger
COPY --from=builder /opt/app-root/src/server_debug /usr/local/bin/fulcio-server
11 changes: 7 additions & 4 deletions docker-compose.debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
build:
context: .
target: "debug"
command: [
entrypoint: [
"dlv",
"exec",
"--listen=:2345",
Expand All @@ -30,10 +30,13 @@ services:
"/usr/local/bin/fulcio-server",
"serve",
"--host=0.0.0.0",
"--port=3000",
"--port=5555",
"--grpc-port=5554",
"--ca=ephemeralca",
]
restart: always # keep the server running
ports:
- "3000:3000"
- "5555:5555"
- "5554:5554"
- "2345:2345"
- "2112:2112"
- "${FULCIO_METRICS_PORT:-2112}:2112"

0 comments on commit f2a8d1a

Please sign in to comment.