mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-02-02 07:46:37 +01:00
install-gosu-binary.sh: install sudo wrapper when executing the script
This commit is contained in:
parent
9d4bb8a0eb
commit
2a425ac1ad
@ -47,7 +47,6 @@ RUN \
|
|||||||
|
|
||||||
COPY imagefiles/cmake.sh /usr/local/bin/cmake
|
COPY imagefiles/cmake.sh /usr/local/bin/cmake
|
||||||
COPY imagefiles/ccmake.sh /usr/local/bin/ccmake
|
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 \
|
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 ; \
|
: nothing to do here since it is updated by manylinux-common/install-python-packages.sh ; \
|
||||||
|
@ -40,3 +40,15 @@ chmod +x /usr/local/bin/gosu
|
|||||||
|
|
||||||
# verify that the binary works
|
# verify that the binary works
|
||||||
gosu nobody true
|
gosu nobody true
|
||||||
|
|
||||||
|
|
||||||
|
cat << EOF >> /usr/bin/sudo
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Emulate the sudo command
|
||||||
|
|
||||||
|
exec gosu root:root "\$@"
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x /usr/bin/sudo
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Emulate the sudo command
|
|
||||||
|
|
||||||
exec gosu root:root "$@"
|
|
Loading…
x
Reference in New Issue
Block a user