From abd161be3146420974e9e2fbde539c04b5d92aba Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Tue, 26 Jul 2022 16:16:57 -0400 Subject: [PATCH] fix(Dockerfile): remove script entrypoint (#2707) - `~/gossamer-dev` is not used - `init` command does not seem needed - `genesis_created` is not used - `exec "$@"` was causing trouble - remove dependency on `bash` --- Dockerfile | 4 +--- scripts/docker-entrypoint.sh | 29 ----------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100755 scripts/docker-entrypoint.sh diff --git a/Dockerfile b/Dockerfile index c3e678117f..41cd48c2b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,9 +48,7 @@ COPY --from=builder /go/src/github.com/ChainSafe/gossamer/libwasmer.so /lib/libw EXPOSE 7001 8546 8540 -ENTRYPOINT ["/gossamer/docker-entrypoint.sh"] -CMD ["/gossamer/bin/gossamer"] +ENTRYPOINT [ "/gossamer/bin/gossamer" ] COPY chain /gossamer/chain -COPY scripts/docker-entrypoint.sh /gossamer/docker-entrypoint.sh COPY --from=builder /go/src/github.com/ChainSafe/gossamer/bin/gossamer /gossamer/bin/gossamer diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh deleted file mode 100755 index e268d21569..0000000000 --- a/scripts/docker-entrypoint.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2019 ChainSafe Systems (ON) Corp. -# This file is part of gossamer. -# -# The gossamer library is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# The gossamer library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with the gossamer library. If not, see . - -mkdir -p ~/gossamer-dev; -BASE_PATH=~/gossamer-dev - -set -euxo pipefail - -if [ ! -f $BASE_PATH/genesis_created ]; then - /gossamer/bin/gossamer init --genesis=/gossamer/chain/gssmr/genesis.json - touch $BASE_PATH/genesis_created; -fi; - -exec "$@"