/alpine-sshd

alpine ssh server

Primary LanguageMakefile

Alpine ssh server

Dockerfile with openssh and your pubkey as authorized_keys

About

This Dockerfile builds an image with embedded pubkey from your $HOME directory. Pubkey filename declared in config.env:

SSH_PUBKEY_FILE=~/.ssh/id_rsa.pub

Quickstart

One-line start with make up:

git clone https://github.com/yasenn/alpine-sshd
cd alpine-sshd
make up

Demo

asciicast

Usage/Examples

$ make
> help                           This help.
> build                          Build the container
> build-nc                       Build the container without caching
> run                            Run container on port configured in `config.env`
> up                             Build & Run container on port configured in `config.env`
> stop                           Stop a running container
> test                           Checks if sshd in container works correctly

Running Tests

To run tests, run the following command

  make stop
  make build
  make run
  make test

Acknowledgements

License

MIT