-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
47 lines (42 loc) · 1.68 KB
/
docker-compose.yaml
File metadata and controls
47 lines (42 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This file is provided as a quick way to deploy ContainerSSH for
# testing purposes. It should not be used for production.
#
# Please see the ContainerSSH reference manual for a detailed guide:
# https://containerssh.io/reference/
---
services:
containerssh:
image: containerssh/containerssh:0.4.1
ports:
# For security we only allow this demo to run on localhost.
- 127.0.0.1:2222:2222
volumes:
# Mount the ContainerSSH config.
- type: bind
source: ./config.yaml
target: /etc/containerssh/config.yaml
# Mount the SSH host key into the container.
# This should be generated by running openssl genrsa
- type: bind
source: ./ssh_host_rsa_key
target: /var/secrets/ssh_host_rsa_key
- type: bind
source: ./ssh_host_ecdsa_key
target: /var/secrets/ssh_host_ecdsa_key
- type: bind
source: ./ssh_host_ed25519_key
target: /var/secrets/ssh_host_ed25519_key
# We are mounting the Docker socket so ContainerSSH can start containers.
# This is not recommended for production, instead you should set up
# TLS authentication over TCP instead. See https://containerssh.io/reference/dockerrun/
# for details.
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
# We are changing the user back to root so we can access the Docker socket.
# We don't recommend using this setting in production. Please take a look
# at https://containerssh.io/reference/dockerrun/ for hardened settings.
user: "root"
authconfig:
# The test-authconfig server lets in the "foo" user with the "bar" password.
image: containerssh/containerssh-test-authconfig:0.4.1