forked from jdeathe/centos-ssh
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
50 lines (50 loc) · 1.48 KB
/
docker-compose.yml
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
48
49
50
# ------------------------------------------------------------------------------
# Ref: https://docs.docker.com/compose/compose-file/
#
# Setup:
# Copy .env.example to .env and modify values as required.
# docker-compose build
# docker-compose down
#
# Run:
# docker-compose up -d
#
# Check service logs:
# docker-compose logs ssh
#
# Usage:
# docker-compose exec ssh sh -c "curl ifconfig.io/all"
#
# Reset - bring down services + delete volume data:
# docker-compose down -v
# ------------------------------------------------------------------------------
version: "3.0"
volumes:
config-ssh:
driver: "local"
services:
ssh:
build:
context: "."
dockerfile: "Dockerfile"
environment:
SSH_AUTHORIZED_KEYS: "${SSH_AUTHORIZED_KEYS}"
SSH_CHROOT_DIRECTORY: "${SSH_CHROOT_DIRECTORY}"
SSH_INHERIT_ENVIRONMENT: "${SSH_INHERIT_ENVIRONMENT}"
SSH_PASSWORD_AUTHENTICATION: "${SSH_PASSWORD_AUTHENTICATION}"
SSH_SUDO: "${SSH_SUDO}"
SSH_USER: "${SSH_USER}"
SSH_USER_FORCE_SFTP: "${SSH_USER_FORCE_SFTP}"
SSH_USER_HOME: "${SSH_USER_HOME}"
SSH_USER_ID: "${SSH_USER_ID}"
SSH_USER_PASSWORD: "${SSH_USER_PASSWORD}"
SSH_USER_PASSWORD_HASHED: "${SSH_USER_PASSWORD_HASHED}"
SSH_USER_PRIVATE_KEY: "${SSH_USER_PRIVATE_KEY}"
SSH_USER_SHELL: "${SSH_USER_SHELL}"
SYSTEM_TIMEZONE: "${SYSTEM_TIMEZONE}"
image: "jdeathe/centos-ssh:latest"
ports:
- "2020:22"
restart: "always"
volumes:
- "config-ssh:/etc/ssh"