Make capability removal logic more robust
This commit is contained in:
parent
37483da0f5
commit
c1c6b6d48e
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ RUN mkdir /builder/.docker && chown -R 65534:65534 /builder/.docker
|
|||
|
||||
RUN find / -mindepth 1 -path /proc -prune -or -path /sys -prune -or -path /dev -prune -or -type f -perm /6000 -exec sh -c "chmod ug-s '{}' && echo \"Removed setuid/setgid bit(s) from '{}'\"" \;
|
||||
|
||||
RUN getcap -r / | awk '{ print $1 }' | xargs -I '{}' sh -c "setcap -r '{}' && echo \"Removed file capability bit(s) from '{}'\""
|
||||
RUN set -eo pipefail; getcap -r / | awk '{ print $1 }' | xargs -I '{}' sh -c "setcap -r '{}' && echo \"Removed file capability bit(s) from '{}'\""
|
||||
|
||||
RUN setcap cap_setuid=ep /usr/bin/newuidmap cap_setgid=ep /usr/bin/newgidmap
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue