From 897d64df88e37b663d4ff45a281ac61f29f47eb3 Mon Sep 17 00:00:00 2001 From: Adar Nimrod Date: Wed, 25 Nov 2020 14:15:40 +0200 Subject: [PATCH] Dockerfile improvements. - Use CMD instead of ENTRYPOINT to launch sshd (easier to overwrite when using locally). - Expose port 22. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e22d4b4..456cd74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -135,5 +135,6 @@ RUN curl --verbose https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key a rm /etc/ssh/ssh_host_* && \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/* VOLUME /run/sshd -ENTRYPOINT ["/usr/sbin/sshd", "-D"] +EXPOSE 22 +CMD ["/usr/sbin/sshd", "-D"] HEALTHCHECK CMD nc -vzw3 localhost 22 || exit 1 -- GitLab