Dockerfiles for running base system containers with sshd
9.3K
This repository provides container images based on the official system distributions with sshd service. Think about that if you want to try a system and you don't want to install a virtual machine, to run a docker container is a good choice. However, when you run a base system image you'll find that it don't have a entry point that can run background forever, it will just run and exit instantly. To solve this problem, we can run a sshd service as its entry point then we can connect to it by ssh.
# Run container background
docker run --init -d -p 2222:22 wqyjh/docker-ssh:ubuntu20.04
# Connect with ssh
# password is 'root'
ssh [email protected] -p 2222
nvidia/cuda:
Python: >= 3
pip install -r requirements.txt
apt:
ubuntu:
- latest
- 16.04
- 14.04
yum:
centos:
- latest
- 7
- 6
alpine:
alpine:
- latest
The above config.yml is in corresponding to the following directory structure.
├── alpine
│ └── latest
│ └── Dockerfile
├── centos
│ ├── 6
│ │ └── Dockerfile
│ ├── 7
│ │ └── Dockerfile
│ └── latest
│ └── Dockerfile
└── ubuntu
├── 14.04
│ └── Dockerfile
├── 16.04
│ └── Dockerfile
└── latest
└── Dockerfile
After you modify the templates or the config.yml, you can run generate.py to apply these changes,
which will generate new files or override the old ones.
python generate.py
Content type
Image
Digest
sha256:81a2b2f3f…
Size
248 Bytes
Last updated
almost 2 years ago
docker pull wqyjh/docker-ssh:sha256-4375dcd2ee7982ed9f285ce409182f4bebebd62fcff9eff15dd15d1207f64551.sig