Skip to content

Commit 7f31ab2

Browse files
author
Jing Liu
committed
commented in compose.yml
1 parent 11dff82 commit 7f31ab2

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

compose.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,39 @@
11
services:
2-
# no X11 mapping is included as it is hard for a beginner to set up an X11 server
32
geant4: # docker compose run --service-ports geant4
4-
image: physino/geant4
5-
platform: linux/amd64
6-
command: /usr/bin/bash
7-
volumes: [ .:/root/geant4 ]
8-
# ports are only exposed by compose up, not compose run
9-
# --service-ports is needed for compose run to expose ports
3+
image: physino/geant4 # minimalistic container image + cmd-line tools
4+
platform: linux/amd64 # pre-compiled geant4 is not available for arm64
5+
command: /usr/bin/bash # `docker compose up` quits immediately
6+
volumes: # no X11 setup is included to be beginner friendly
7+
- .:/root/geant4 # load current folder as /root/geant4 in container
8+
# ports are only exposed by `compose up`, not `compose run`
9+
# --service-ports is needed for `compose run` to expose ports
1010
ports: [ 8888:8888, 8889:8889 ]
11+
# feel free to change the timezone identifier below according to
12+
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
1113
environment: [ TZ=US/Central ]
1214
hostname: AlmaLinux
13-
build: container
14-
g4:
15-
image: physino/geant4:11.2.1
16-
platform: linux/amd64 # pre-compiled geant4 is not available for arm64
17-
profiles: [ "g4" ] # avoid running it by `compose up`
15+
container_name: physino-geant4
16+
build: container # for container developers
17+
g4: # docker compose run --rm g4
18+
image: physino/geant4:11.2.1 # minimalistic container image
19+
platform: linux/amd64
20+
profiles: [ "g4" ] # avoid running it by `docker compose up`
1821
command: /usr/bin/bash
1922
volumes: [ .:/root/geant4 ]
2023
# https://unix.stackexchange.com/a/698068/26929
2124
# https://stackoverflow.com/a/63291253/1801749
2225
environment: [ TZ=US/Central ]
2326
hostname: AlmaLinux # https://stackoverflow.com/a/63291253/1801749
24-
build: 11.2.1
27+
build: 11.2.1 # docker compose build g4
2528
heprapp: # docker compose run --rm heprapp
2629
command: /usr/bin/hv # launch HepRApp
2730
image: physino/heprapp # https://hub.docker.com/r/physino/heprapp
2831
profiles: [ "heprapp" ]
2932
environment:
3033
- DISPLAY=host.docker.internal:0.0
34+
# host.docker.internal doesn't exist in a Linux host
35+
# https://stackoverflow.com/a/24326540
36+
# https://stackoverflow.com/questions/70725881
3137
extra_hosts:
3238
- "host.docker.internal:host-gateway"
3339
volumes:

0 commit comments

Comments
 (0)