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

Merge branch 'fix_env' into 'master'

Fix environment setup for CI usage

See merge request !74
parents 6d8ac050 a2bfa01e
Branches
Tags
1 merge request!74Fix environment setup for CI usage
......@@ -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 /
......
#! /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
......
#!/usr/bin/env bash
source /etc/profile
## Force environment to be clean
source /etc/eic-env.sh
exec "$@"
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment