Sign inSign up

bitroniq/docker-centos-ssh

By bitroniq

Updated over 7 years ago

CentOS with SSH

Image
0

320

bitroniq/docker-centos-ssh repository overview

docker-centos-ssh

Build your image with latest CentOS with SSH installed and running inside container.

This Dockerfile is automatically build on Docker Hub: https://hub.docker.com/r/bitroniq/docker-centos-ssh/

Building & Running

Copy the sources to your docker host and build the container:

# docker build --rm -t <username>/ssh:centos7 .

To run:

# docker run -d -p 22 <username>/ssh:centos7

Get the port that the container is listening on:

# docker ps
CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS              PORTS                   NAMES
8c82a9287b23        <username>/ssh:centos7   /usr/sbin/sshd -D   4 seconds ago       Up 2 seconds        0.0.0.0:49154->22/tcp   mad_mccarthy        

To test, use the port that was just located:

# ssh -p xxxx user@localhost 

Tag summary

Content type

Image

Digest

Size

107 MB

Last updated

over 7 years ago

docker pull bitroniq/docker-centos-ssh