Skip to content

Commit 8df3a7d

Browse files
committed
Merge the three SSH setup RUN blocks together
1 parent 57c9c24 commit 8df3a7d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

debian/Dockerfile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,10 @@ RUN sed -i /etc/ssh/sshd_config \
9696
-e 's/#PasswordAuthentication.*/PasswordAuthentication no/' \
9797
-e 's/#SyslogFacility.*/SyslogFacility AUTH/' \
9898
-e 's/#LogLevel.*/LogLevel INFO/' && \
99-
mkdir /var/run/sshd
100-
101-
# modify PAM to allow SSH access to container
102-
RUN sed -i 's/\(session\s*\)required\(\s*pam_loginuid.so\)/\1optional\2/' \
103-
/etc/pam.d/sshd
104-
105-
# remove motd to have quiet login
106-
RUN rm -f /etc/update-motd.d/10-uname; cat /dev/null >/etc/motd
99+
mkdir /var/run/sshd; \
100+
sed -i 's/\(session\s*\)required\(\s*pam_loginuid.so\)/\1optional\2/' \
101+
/etc/pam.d/sshd; \
102+
rm -f /etc/update-motd.d/10-uname; cat /dev/null >/etc/motd
107103

108104
# VOLUME directive must happen after setting up permissions and content
109105
VOLUME "${AGENT_WORKDIR}" "${JENKINS_AGENT_HOME}"/.jenkins "/tmp" "/run" "/var/run"

0 commit comments

Comments
 (0)