From 73f0b023d74373f3d8823c0169092c0bc181caf4 Mon Sep 17 00:00:00 2001 From: Sylvester Joosten <sjoosten@anl.gov> Date: Mon, 7 Jun 2021 16:25:52 +0000 Subject: [PATCH] debug --- containers/jug/Dockerfile.dev | 2 +- containers/jug/eic-shell | 42 ++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/containers/jug/Dockerfile.dev b/containers/jug/Dockerfile.dev index 5d31d5812..c3fccbc81 100644 --- a/containers/jug/Dockerfile.dev +++ b/containers/jug/Dockerfile.dev @@ -221,7 +221,7 @@ COPY eic-shell /usr/local/bin/eic-shell ## make sure we have the entrypoints setup correctly ENTRYPOINT ["/usr/local/bin/eic-shell"] -#CMD [] +CMD ["bash", "--rcfile", "/etc/profile", "-l"] USER 0 WORKDIR / SHELL ["/usr/local/bin/eic-shell"] diff --git a/containers/jug/eic-shell b/containers/jug/eic-shell index 30761d5db..b87bf8d92 100755 --- a/containers/jug/eic-shell +++ b/containers/jug/eic-shell @@ -4,24 +4,26 @@ 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 - piped_args+=("${line}") - echo LINE: ${line} - done -fi +exec "$@" -## Fire off bash - -if [ "${#piped_args[@]}" != "0" ]; then - echo "${#piped_args[@]}" - printf "%s\n" "${piped_args[@]}" - printf "%s\n" "${piped_args[@]}" > debug.txt - printf "%s\n" "${piped_args[@]}" | bash -elif [ $# -gt 0 ]; then - exec bash -c "$@" -else - exec bash -fi +#piped_args=() +#if [ -p /dev/stdin ]; then +# # If we want to read the input line by line +# while IFS= read line; do +# piped_args+=("${line}") +# echo LINE: ${line} +# done +#fi +# +### Fire off bash +# +#if [ "${#piped_args[@]}" != "0" ]; then +# echo "${#piped_args[@]}" +# printf "%s\n" "${piped_args[@]}" +# printf "%s\n" "${piped_args[@]}" > debug.txt +# printf "%s\n" "${piped_args[@]}" | bash +#elif [ $# -gt 0 ]; then +# exec bash -c "$@" +#else +# exec bash +#fi -- GitLab