| .dockerignore | ||
| .gitignore | ||
| 10-ssh-container.conf | ||
| Dockerfile | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| ssh-entrypoint | ||
| ssh-healthcheck | ||
| update-ssh-keys | ||
SSH Container
A simple container which runs SSH upon startup.
It will persist SSH host keys in /srv/ssh/ - thus allowing the
container to have a persistent SSH "identity" across startups.
Note that this container does not set up any users, nor does it set
up any authorized_keys files anywhere. But it does make some minor
tweaks to the Debian default SSH configuration - see
10-ssh-container.conf for details.
The container's ENTRYPOINT will generate keys as needed (and persist
them to /srv/ssh/) and start a SSH daemon before launching the given
command. If no command is given, it will default to /bin/bash.
If you build a container based on this image, be sure to do one of:
-
Do not override the Dockerfile
ENTRYPOINT, thus leaving theENTRYPOINTfrom this container in effect. -
Make your Dockerfile
ENTRYPOINTa call to/ssh-entrypointgiving the path to your own entrypoint (and any parameters it needs) as parameters - e.g.:# Dockerfile ... COPY mycontainer-entrypoint /mycontainer-entrypoint ENTRYPOINT ["/ssh-entrypoint", "/mycontainer-entrypoint", "foo", "bar"] ...
Health Check
The container provides a simple health check with the command /ssh-healthcheck.
If you base your own image on this image, be sure to invoke
/ssh-healthcheck as part of your own healthcheck.