-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
34 lines (32 loc) · 1.58 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
# Specifies the version of Docker Compose file format
version: '3.5'
services:
ubuntu-vnc:
cap_add:
- SYS_ADMIN
build: ./ # Build context for image
image: rsargent/ubuntu-vnc:20.04
container_name: ubuntu-vnc-20.04
hostname: ubuntu-vnc # hostname inside container
restart: always # auto-restart on exit
shm_size: 1g # Size of /dev/shm. Required for chrome to not crash?
# Environment variables, accessible by scripts and applications inside the container
#environment:
command: >
/bin/bash /etc/ubuntu_vnc/run_docker.sh $USER
# Exposes ports to the host machine
ports:
- "127.0.0.1:5920:5901" # VNC: publish container:5901 to host:5920 (locahost only)
- "127.0.0.1:6120:22" # SSH: publish container:22 to host:6120 (locahost only)
# Mounts host paths or named volumes, specified in the `volumes` section, into the container
volumes:
- ../ubuntu_vnc_homedir:/home/$USER
- ./etc_ubuntu_vnc:/etc/ubuntu_vnc
- /var/run/postgresql:/var/run/postgresql # Mount the host's postgresql socket into the container
# - .secrets/users.list:/etc/users.list # Map host .secrets/users.list to container /etc/users.list
# - ssh:/etc/ssh/ # Uncomment to mount the `ssh` volume into /etc/ssh/ in the container
# - home/:/home/ # Uncomment to mount the `home` volume into /home/ in the container
# Defines the named volumes used in this docker-compose file
#volumes:
# ssh: # Named volume, can be used by services in the `volumes` section
# home: # Named volume, can be used by services in the `volumes` section