From e6203ed3e1bd5db9f821039e3bc8123eeb45772e Mon Sep 17 00:00:00 2001 From: Andrea V <1577639+karimodm@users.noreply.github.com> Date: Sat, 29 Jan 2022 12:53:26 +0100 Subject: [PATCH] Do not hardcode parameters in Docker ENTRYPOINT (#1992) * Do not hardcode Docker database.directory * Do not hardcode parameters in Docker entrypoint --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8f91fbbaf6..17ebd1577c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -120,7 +120,7 @@ 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 @@ -128,7 +128,7 @@ 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 \ No newline at end of file +FROM debugger-enabled-${REMOTE_DEBUGGING} as runtime