Backport install-gosu-binary-wrapper from dockbuid

To ensure that our custom sudo wrapper is not
overwritten by a future re-install of sudo, it
is created in /usr/loca/bin

See https://github.com/dockbuild/dockbuild/issues/52
This commit is contained in:
Jean-Christophe Fillion-Robin
2019-06-08 17:47:03 -04:00
parent f5c380f467
commit edf132509b
6 changed files with 36 additions and 36 deletions

@ -1,6 +1,7 @@
# Image build scripts
COPY \
imagefiles/install-gosu-binary.sh \
imagefiles/install-gosu-binary-wrapper.sh \
manylinux-common/install-python-packages.sh \
/buildscripts/
@ -16,8 +17,9 @@ RUN \
wget \
zip \
&& \
yum clean all && \
/buildscripts/install-gosu-binary.sh && \
yum clean all && \
/buildscripts/install-gosu-binary.sh && \
/buildscripts/install-gosu-binary-wrapper.sh && \
# Remove sudo provided by "devtoolset-2" and "devtoolset-8" since it doesn't work with
# our sudo wrapper calling gosu.
rm -f /opt/rh/devtoolset-2/root/usr/bin/sudo && \