mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-23 09:04:27 +01:00
Merge pull request #62 from jcfr/manylinux-ownership-of-python-install
manylinux.common: Fix warning changing ownership of python install
This commit is contained in:
commit
39c5f29733
@ -7,6 +7,8 @@ RUN cd /opt && \
|
|||||||
COPY manylinux-common/install-python-packages.sh /usr/local/bin
|
COPY manylinux-common/install-python-packages.sh /usr/local/bin
|
||||||
RUN /usr/local/bin/install-python-packages.sh
|
RUN /usr/local/bin/install-python-packages.sh
|
||||||
|
|
||||||
|
COPY manylinux-common/pre_exec.sh /dockcross/pre_exec.sh
|
||||||
|
|
||||||
RUN yum -y install sudo && \
|
RUN yum -y install sudo && \
|
||||||
sed -i 's/Defaults requiretty/#Defaults requiretty/' /etc/sudoers && \
|
sed -i 's/Defaults requiretty/#Defaults requiretty/' /etc/sudoers && \
|
||||||
visudo -c
|
visudo -c
|
||||||
|
@ -31,6 +31,11 @@ if [[ -n $BUILDER_UID ]] && [[ -n $BUILDER_GID ]]; then
|
|||||||
cp -r /root/* $HOME/
|
cp -r /root/* $HOME/
|
||||||
chown -R $BUILDER_UID:$BUILDER_GID $HOME/*
|
chown -R $BUILDER_UID:$BUILDER_GID $HOME/*
|
||||||
|
|
||||||
|
# Additional updates specific to the image
|
||||||
|
if [[ -e /dockcross/pre_exec.sh ]]; then
|
||||||
|
/dockcross/pre_exec.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# Run the command as the specified user/group.
|
# Run the command as the specified user/group.
|
||||||
exec chpst -u :$BUILDER_UID:$BUILDER_GID "$@"
|
exec chpst -u :$BUILDER_UID:$BUILDER_GID "$@"
|
||||||
else
|
else
|
||||||
|
8
manylinux-common/pre_exec.sh
Executable file
8
manylinux-common/pre_exec.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
for DIR in /opt/python/*/lib/python*/site-packages; do
|
||||||
|
chown -R $BUILDER_UID:$BUILDER_GID $DIR
|
||||||
|
done
|
||||||
|
for DIR in /opt/python/*/bin; do
|
||||||
|
chown -R $BUILDER_UID:$BUILDER_GID $DIR
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user