No description
Find a file
2025-10-08 21:06:36 +01:00
.dockerignore Docker does not need Makefile 2025-10-07 19:17:37 +01:00
.gitignore Update Makefile to allow local testing 2025-10-07 19:12:30 +01:00
10-ssh-container.conf Rename ssh configuration drop-in file. 2025-10-07 19:17:32 +01:00
Dockerfile Tidyup: use a non-interactive frontend for apt-get 2025-10-08 21:06:36 +01:00
LICENSE Add docker image labels and license 2025-10-07 22:22:41 +01:00
Makefile Base the image on Debian Trixie rather than "stable" 2025-10-08 21:04:24 +01:00
README.md Add health check 2025-10-07 20:13:29 +01:00
ssh-entrypoint Update Makefile to allow local testing 2025-10-07 19:12:30 +01:00
ssh-healthcheck Add health check 2025-10-07 20:13:29 +01:00
update-ssh-keys Update Makefile to allow local testing 2025-10-07 19:12:30 +01:00

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 the ENTRYPOINT from this container in effect.

  • Make your Dockerfile ENTRYPOINT a call to /ssh-entrypoint giving 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.