Skip to content

Commit bd6be8d

Browse files
author
Nils Bars
committed
Set sshd_config mode to 0644 when copied into the exercise base image
Use COPY --chmod=0644 so the file inside the image is not group-writable regardless of its mode in the working tree.
1 parent 399046f commit bd6be8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ref-docker-base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ RUN mkdir .ssh && chmod 700 .ssh
9292
# sshd_config references /etc/ssh/master_keys/%u for key lookup.
9393
RUN mkdir -p /etc/ssh/master_keys
9494

95-
COPY sshd_config /etc/ssh/sshd_config
95+
COPY --chmod=0644 sshd_config /etc/ssh/sshd_config
9696

9797
# Replace /bin/sh with a shell that does not drop privileges
9898
# in case euid != uid.

0 commit comments

Comments
 (0)