Initial commit
This commit is contained in:
parent
c785944bae
commit
a3e6c67270
35 changed files with 1152 additions and 0 deletions
19
root/opt/app-root/etc/generate_container_user
Normal file
19
root/opt/app-root/etc/generate_container_user
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# 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
|
||||
6
root/opt/app-root/etc/scl_enable
Normal file
6
root/opt/app-root/etc/scl_enable
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# IMPORTANT: Do not add more content to this file unless you know what you are
|
||||
# doing. This file is sourced everytime the shell session is opened.
|
||||
# This will make scl collection binaries work out of box.
|
||||
unset BASH_ENV PROMPT_COMMAND ENV
|
||||
source scl_source enable httpd24 rh-python36
|
||||
source /opt/app-root/bin/activate
|
||||
Loading…
Add table
Add a link
Reference in a new issue