-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
48 lines (47 loc) · 2.12 KB
/
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
services:
geant4: # docker compose run --service-ports geant4
image: physino/geant4 # minimalistic container image + cmd-line tools
platform: linux/amd64 # pre-compiled geant4 is not available for arm64
command: /usr/bin/bash # `docker compose up` quits immediately
volumes: # no X11 setup is included to be beginner friendly
- .:/root/geant4 # load current folder as /root/geant4 in container
# ports are only exposed by `compose up`, not `compose run`
# --service-ports is needed for `compose run` to expose ports
ports: [ 8888:8888, 8889:8889 ]
# feel free to change the timezone identifier below according to
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
environment: [ TZ=US/Central ]
hostname: AlmaLinux
container_name: physino-geant4
build: container # for container developers
g4: # docker compose run --rm g4
image: physino/geant4:11.3.0 # minimalistic container image
platform: linux/amd64
profiles: [ "g4" ] # avoid running it by `docker compose up`
command: /usr/bin/bash
volumes: [ .:/root/geant4 ]
# https://unix.stackexchange.com/a/698068/26929
# https://stackoverflow.com/a/63291253/1801749
environment: [ TZ=US/Central ]
hostname: AlmaLinux # https://stackoverflow.com/a/63291253/1801749
build: 11.3.0 # docker compose build g4
heprapp: # docker compose run --rm heprapp
command: /usr/bin/hv # launch HepRApp
image: physino/heprapp # https://hub.docker.com/r/physino/heprapp
profiles: [ "heprapp" ]
environment:
- DISPLAY=host.docker.internal:0.0
# host.docker.internal doesn't exist in a Linux host
# https://stackoverflow.com/a/24326540
# https://stackoverflow.com/questions/70725881
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- .:/root/geant4
# https://github.com/microsoft/WSL/issues/5339#issuecomment-1125709672
# https://docs.docker.com/compose/compose-file/#sysctls
sysctls:
- net.ipv4.tcp_keepalive_intvl=60
- net.ipv4.tcp_keepalive_probes=5
- net.ipv4.tcp_keepalive_time=300