From a30b429cd7675e5feba10dd8220fa6385ae7cb32 Mon Sep 17 00:00:00 2001 From: takase1121 <20792268+takase1121@users.noreply.github.com> Date: Thu, 6 Jun 2024 21:27:48 +0800 Subject: [PATCH] image: load script from command-line argument image: print debug information image: remove entrypoint by default --- Dockerfile | 2 +- entrypoint.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100755 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index f8b58ff..2e4c798 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,4 +36,4 @@ RUN sudo add-apt-repository -y ppa:git-core/ppa && \ # install libdecor RUN dpkg --force-all -i libdecor-0-dev_0.1.0-3build1_amd64.deb libdecor-0-0_0.1.0-3build1_amd64.deb -SHELL [ "/bin/bash", "--login", "-e", "-o", "pipefail", "-c" ] \ No newline at end of file +ADD entrypoint.sh / diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..7b23020 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +SCRIPT="$(mktemp)" + +printf '#!/bin/bash\n' > "$SCRIPT" +printf '%s' "$*" >> "$SCRIPT" + +exec /bin/bash --login -e -o pipefail "$SCRIPT"