Skip to content
Snippets Groups Projects
Commit b85e0fd2 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Added container shell wrapper to setup release container

parent 5e2ac09d
No related branches found
No related tags found
1 merge request!3v2.0.1
...@@ -26,10 +26,12 @@ COPY --from=builder /opt/view /opt/view ...@@ -26,10 +26,12 @@ COPY --from=builder /opt/view /opt/view
COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/profile.d/z10_spack_environment.sh COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/profile.d/z10_spack_environment.sh
## Setup global bashrc, useful for singularity ## Setup global bashrc, useful for singularity
COPY --from=builder /root/.bashrc /etc/bash.bashrc COPY --from=builder /root/.bashrc /etc/bash.bashrc
COPY eic-shell /usr/local/bin/eic-shell
COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/eic-env.sh
## make sure we have the entrypoints setup correctly ## make sure we have the entrypoints setup correctly
ENTRYPOINT [] ENTRYPOINT []
CMD ["bash", "--rcfile", "/etc/profile", "-l"] CMD ["bash", "--rcfile", "/etc/profile", "-l"]
USER 0 USER 0
WORKDIR / WORKDIR /
SHELL ["bash", "--rcfile", "/etc/profile"] SHELL ["/usr/local/bin/eic-shell"]
#! /usr/bin/env bash
source /etc/profile
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
done
fi
## Fire off bash
if [ ${piped_args} ] ; then
echo -e ${piped_args} | exec bash
elif [ $# -gt 0 ]; then
exec bash -c "$@"
else
exec bash
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment