Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Dockerize SSH server using Dockerfile
Rajit Paul
Rajit Paul

Posted on

     

Dockerize SSH server using Dockerfile

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

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

DevSecOps@IshaFoundation, AWS Community Builder
  • Location
    Kolkata, India
  • Joined

More fromRajit Paul

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp