Skip to content
Snippets Groups Projects
Commit 897d64df authored by nimrod's avatar nimrod
Browse files

Dockerfile improvements.

- Use CMD instead of ENTRYPOINT to launch sshd (easier to overwrite when
using locally).
- Expose port 22.
parent c321d783
No related branches found
No related tags found
No related merge requests found
Pipeline #84 passed
...@@ -135,5 +135,6 @@ RUN curl --verbose https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key a ...@@ -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 /etc/ssh/ssh_host_* && \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/* rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/*
VOLUME /run/sshd VOLUME /run/sshd
ENTRYPOINT ["/usr/sbin/sshd", "-D"] EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
HEALTHCHECK CMD nc -vzw3 localhost 22 || exit 1 HEALTHCHECK CMD nc -vzw3 localhost 22 || exit 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment