diff --git a/Dockerfile b/Dockerfile index 32e32e1b9f521a99fbd186e2e4f0317780391d65..eb0691e87788d826b28801a86a25fdc61075b55f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,10 +24,8 @@ ENV PROMPT_COMMAND="" # Copy extra files to the image. COPY ./scripts /usr/bin -RUN chmod a+x /usr/bin/container-entrypoint && \ - chmod a+x /usr/bin/fix-permissions && \ +RUN chmod a+x /usr/bin/fix-permissions && \ chmod a+x /usr/bin/rpm-file-permissions && \ - chmod a+x /usr/bin/generate-container-user && \ chmod a+x /usr/bin/py-enable # yum Updates diff --git a/scripts/container-entrypoint b/scripts/container-entrypoint deleted file mode 100644 index 339a74c197880c01b98183e3bbe296d746ebfe02..0000000000000000000000000000000000000000 --- a/scripts/container-entrypoint +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# temp: hard coding "hero" as container username (todo: fix to use env vars for username and homedir) -if [ `id -u` -ge 1 ]; then - echo "hero:x:`id -u`:`id -g`:here:/opt/app-root:/bin/bash" >> /etc/passwd -fi - -exec "$@" - diff --git a/scripts/generate-container-user b/scripts/generate-container-user deleted file mode 100644 index f092c51e489c1e05f918f1005e8bddf0925cc0da..0000000000000000000000000000000000000000 --- a/scripts/generate-container-user +++ /dev/null @@ -1,20 +0,0 @@ -# Set current user in nss_wrapper -USER_ID=$(id -u) -GROUP_ID=$(id -g) - -if [ x"$USER_ID" != x"0" -a x"$USER_ID" != x"1001" ]; then - - NSS_WRAPPER_PASSWD=/opt/app-root/etc/passwd - NSS_WRAPPER_GROUP=/etc/group - - cat /etc/passwd | sed -e 's/^default:/builder:/' > $NSS_WRAPPER_PASSWD - - echo "default:x:${USER_ID}:${GROUP_ID}:Default Application User:${HOME}:/sbin/nologin" >> $NSS_WRAPPER_PASSWD - - export NSS_WRAPPER_PASSWD - export NSS_WRAPPER_GROUP - - LD_PRELOAD=libnss_wrapper.so - export LD_PRELOAD -fi -