mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
Prevent deletion of nginx user by entrypoint.sh - Fixes: https://github.com/ansible/awx/issues/9552 Enable fuse-overlayfs in all images - native overlay not supported until kernel 5.13+ - Fixes: https://github.com/ansible/awx/issues/10099 Refs: https://www.redhat.com/sysadmin/podman-rootless-overlay https://www.redhat.com/en/blog/working-container-storage-library-and-tools-red-hat-enterprise-linux
36 lines
702 B
Bash
Executable File
36 lines
702 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ `id -u` -ge 500 ] || [ -z "${CURRENT_UID}" ]; then
|
|
|
|
cat << EOF > /etc/passwd
|
|
root:x:0:0:root:/root:/bin/bash
|
|
awx:x:`id -u`:`id -g`:,,,:/var/lib/awx:/bin/bash
|
|
nginx:x:`id -u nginx`:`id -g nginx`:Nginx web server:/var/lib/nginx:/sbin/nologin
|
|
EOF
|
|
|
|
cat <<EOF >> /etc/group
|
|
awx:x:`id -u`:awx
|
|
EOF
|
|
|
|
cat <<EOF > /etc/subuid
|
|
awx:100000:50001
|
|
EOF
|
|
|
|
cat <<EOF > /etc/subgid
|
|
awx:100000:50001
|
|
EOF
|
|
|
|
fi
|
|
|
|
# Required to get rootless podman working after
|
|
# writing out the sub*id files above
|
|
podman system migrate
|
|
|
|
if [[ "$OS" == *"Docker Desktop"* ]]; then
|
|
export SDB_NOTIFY_HOST='docker.for.mac.host.internal'
|
|
else
|
|
export SDB_NOTIFY_HOST=$(ip route | head -n1 | awk '{print $3}')
|
|
fi
|
|
|
|
exec $@
|