diff --git a/containers/jug/Dockerfile.dev b/containers/jug/Dockerfile.dev index f4446d1a3e9a6fcbe56312cc147c4a0b47297d01..4f1c3a29165a532779f7114ece953e39e8ff9e76 100644 --- a/containers/jug/Dockerfile.dev +++ b/containers/jug/Dockerfile.dev @@ -189,6 +189,15 @@ RUN find -L /usr/local/* \ | grep 'x-executable\|x-archive\|x-sharedlib' \ | awk -F: '{print $1}' | xargs strip -s +## Bugfix to address issues loading the Qt5 libraries on Linux kernels prior to 3.15 +## See +#https://askubuntu.com/questions/1034313/ubuntu-18-4-libqt5core-so-5-cannot-open-shared-object-file-no-such-file-or-dir +## and links therin for more info +RUN strip --remove-section=.note.ABI-tag /usr/local/lib/libQt5Core.so + +COPY eic-shell /usr/local/bin/eic-shell +COPY entrypoint.sh /usr/local/sbin/entrypoint.sh + ## ======================================================================================== ## STAGE 3 ## Lean target image @@ -211,16 +220,9 @@ RUN --mount=from=staging,target=/staging \ && cat /etc/profile.d/z11_jug_env.sh >> /etc/eic-env.sh \ && cp /etc/eic-env.sh /etc/profile.d/z10_eic-env.sh -## Bugfix to address issues loading the Qt5 libraries on Linux kernels prior to 3.15 -## See -#https://askubuntu.com/questions/1034313/ubuntu-18-4-libqt5core-so-5-cannot-open-shared-object-file-no-such-file-or-dir -## and links therin for more info -RUN strip --remove-section=.note.ABI-tag /usr/local/lib/libQt5Core.so - -COPY eic-shell /usr/local/bin/eic-shell ## make sure we have the entrypoints setup correctly -ENTRYPOINT [] +ENTRYPOINT ["/usr/local/sbin/entrypoint.sh"] CMD ["bash", "--rcfile", "/etc/profile", "-l"] USER 0 WORKDIR / diff --git a/containers/jug/eic-shell b/containers/jug/eic-shell index e2b54ed1fbf8197ca4c62e927ef795405685ec51..2627cab7f89539bd9d398d6922312153441a9a9d 100755 --- a/containers/jug/eic-shell +++ b/containers/jug/eic-shell @@ -1,23 +1,21 @@ -#! /usr/bin/env bash +#!/usr/bin/env bash source /etc/profile ## Force environment to be clean source /etc/eic-env.sh +piped_args=() if [ -p /dev/stdin ]; then # If we want to read the input line by line while IFS= read line; do - if [ -z "$piped_args" ]; then - piped_args="${line}" - else - piped_args="${piped_args}\n${line}" - fi + piped_args+=("${line}") done fi -## Fire off bash -if [ ${piped_args} ] ; then - echo -e ${piped_args} | exec bash +### Fire off bash +if [ "${#piped_args[@]}" != "0" ]; then + echo "${#piped_args[@]}" + printf "%s\n" "${piped_args[@]}" | bash elif [ $# -gt 0 ]; then exec bash -c "$@" else diff --git a/containers/jug/entrypoint.sh b/containers/jug/entrypoint.sh new file mode 100755 index 0000000000000000000000000000000000000000..589ff3c92e83867c9a4f2c4f6407c5ac671ba3fb --- /dev/null +++ b/containers/jug/entrypoint.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +source /etc/profile +## Force environment to be clean +source /etc/eic-env.sh + +exec "$@" diff --git a/gitlab-ci/docker_login.sh b/gitlab-ci/docker_login.sh index e295710fccd837489b4dd532dac4330185761d8e..037b064505b9b29901808e8d0501924d670a6d92 100755 --- a/gitlab-ci/docker_login.sh +++ b/gitlab-ci/docker_login.sh @@ -5,8 +5,8 @@ function print_the_help { echo "USAGE: -u user -p -password [...] [registry]" echo "ARGUMENTS:" - echo " -u,--user Input image name (e.g., eic_base)" - echo " -p,--password Input tag (eg., v3.0.0)" + echo " -u,--user Registry user" + echo " -p,--password Registry password" echo " --ci Login to internal CI registry; -u, -p and positional are ignored" echo " -t,--time Time interval (in seconds) between attempts" echo " (doubled each time), default: 5"