install-gosu-binary.sh: install sudo wrapper when executing the script

This commit is contained in:
Jean-Christophe Fillion-Robin 2018-06-06 20:00:46 -04:00
parent 9d4bb8a0eb
commit 2a425ac1ad
No known key found for this signature in database
GPG Key ID: BAF1E1AEB9097A41
3 changed files with 12 additions and 6 deletions

View File

@ -47,7 +47,6 @@ RUN \
COPY imagefiles/cmake.sh /usr/local/bin/cmake
COPY imagefiles/ccmake.sh /usr/local/bin/ccmake
COPY imagefiles/sudo.sh /usr/bin/sudo
RUN if [ -e /opt/python/cp35-cp35m/bin/python ]; then \
: nothing to do here since it is updated by manylinux-common/install-python-packages.sh ; \

View File

@ -40,3 +40,15 @@ chmod +x /usr/local/bin/gosu
# verify that the binary works
gosu nobody true
cat << EOF >> /usr/bin/sudo
#!/bin/sh
# Emulate the sudo command
exec gosu root:root "\$@"
EOF
chmod +x /usr/bin/sudo

View File

@ -1,5 +0,0 @@
#!/bin/sh
# Emulate the sudo command
exec gosu root:root "$@"