Remove setuid and setgid permissions in the images to prevent privilege escalation attacks within containers
parent
b108b4be06
commit
626b4775ba
|
|
@ -136,6 +136,10 @@ RUN cd $CATALINA_HOME/lib \
|
||||||
|
|
||||||
# copy scripts
|
# copy scripts
|
||||||
COPY *.sh /opt/
|
COPY *.sh /opt/
|
||||||
|
|
||||||
|
# CIS Docker benchmark: Remove setuid and setgid permissions in the images to prevent privilege escalation attacks within containers.
|
||||||
|
RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true
|
||||||
|
|
||||||
# GeoServer user => restrict access to $CATALINA_HOME and GeoServer directories
|
# GeoServer user => restrict access to $CATALINA_HOME and GeoServer directories
|
||||||
# See also CIS Docker benchmark and docker best practices
|
# See also CIS Docker benchmark and docker best practices
|
||||||
RUN chmod +x /opt/*.sh \
|
RUN chmod +x /opt/*.sh \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue