Skip to content

Commit

Permalink
Do not hardcode parameters in Docker ENTRYPOINT (#1992)
Browse files Browse the repository at this point in the history
* Do not hardcode Docker database.directory

* Do not hardcode parameters in Docker entrypoint
  • Loading branch information
karimodm authored Jan 29, 2022
1 parent f0363db commit e6203ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ COPY --chown=nonroot:nonroot --from=build /go/bin/goshimmer /run/goshimmer
# We execute this stage only if debugging is disabled, i.e REMOTE_DEBUGGIN==0.
FROM prepare-runtime as debugger-enabled-0

ENTRYPOINT ["/run/goshimmer", "--config=/config.json", "--messageLayer.snapshot.file=/snapshot.bin", "--database.directory=/tmp/mainnetdb"]
ENTRYPOINT ["/run/goshimmer", "--config=/config.json"]

# We execute this stage only if debugging is enabled, i.e REMOTE_DEBUGGIN==1.
FROM prepare-runtime as debugger-enabled-1
EXPOSE 40000

# Copy the Delve binary
COPY --chown=nonroot:nonroot --from=build /go/bin/dlv /run/dlv
ENTRYPOINT ["/run/dlv","--listen=:40000", "--headless=true" ,"--api-version=2", "--accept-multiclient", "exec", "--continue", "/run/goshimmer", "--", "--config=/config.json", "--messageLayer.snapshot.file=/snapshot.bin", "--database.directory=/tmp/mainnetdb"]
ENTRYPOINT ["/run/dlv","--listen=:40000", "--headless=true" ,"--api-version=2", "--accept-multiclient", "exec", "--continue", "/run/goshimmer", "--", "--config=/config.json"]

# Execute corresponding build stage depending on the REMOTE_DEBUGGING build arg.
FROM debugger-enabled-${REMOTE_DEBUGGING} as runtime
FROM debugger-enabled-${REMOTE_DEBUGGING} as runtime

0 comments on commit e6203ed

Please sign in to comment.