docker-compose.yaml
version: "3"
services:
openssh:
image: hoanghd/openssh:latest
container_name: openssh
restart: always
tty: true
ports:
- 2222:22
$ docker-compose up
$ ssh root@localhost -p 2222
docker-compose.yaml
version: "3"
services:
openssh:
image: hoanghd/openssh:latest
container_name: openssh
restart: always
tty: true
ports:
- 2222:22
volumes:
- ~/.ssh/id_rsa.pub:/root/.ssh/authorized_keys
$ docker-compose up
$ ssh localhost -p 2222
Content type
Image
Digest
sha256:625e4a082…
Size
5.3 MB
Last updated
over 3 years ago
docker pull hoanghd/openssh