Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 762 Bytes

README.md

File metadata and controls

17 lines (10 loc) · 762 Bytes

Dockerssh

A Dockerfile for an alpine ssh server

Running the Alpine ssh server

To the run the Dockerfile you'll need to put your public key under the name id_rsa.pub in the same location as the Dockerfile (the name can be changed inside the Dockerfile). You'll additionally need to follow the following steps:

  1. Start Docker

  2. Open a terminal and navigate to the Dockerfile

  3. Build an image with the following command: docker build -t alpinessh .

  4. Run the container with the following command: docker run -d --name ssh -p 5554:22 alpinessh

  • Note: This will map the container's ssh server to the port 5554, you can change that by changing the port above.

You should now be able to access your Docker container by ssh on your 5554 port.