DEV Community

loading...
Cover image for Dockerize SSH server using Dockerfile

Dockerize SSH server using Dockerfile

Rajit Paul
Experienced in working with different technologies and integrating them to find the optimal solution for a challenge. AWS | DevOps | ML | DL | Mobile-Dev
・1 min read

Hope you are having a great day, let us begin this journey :D


Recently I came across a use case where I had to configure a web server on top of a docker container using Ansible, which means I had to set up an ssh server on top of the Docker container for Ansible to gain remote access and automate the configuration process.


So I went on the path of creating an SSH-enabled Docker Image using Dockerfile. We shall be using the Open SSH of the secure shell family in this use-case and centos: latest as the base image for our docker image.

Dockerfile -

Alt Text
You can download the pre-created docker image that I uploaded on Docker-Hub using
docker pull submar1n3/openssh:v1


You can also use the same code and create your own Docker Image -
https://github.com/RajitPaul11/Dockerfile/tree/main/openssh


Thanks for reading, cheers :D

Discussion (0)

Forem Open with the Forem app