|
1 | 1 | services:
|
2 |
| - # no X11 mapping is included as it is hard for a beginner to set up an X11 server |
3 | 2 | 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 |
10 | 10 | 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 |
11 | 13 | environment: [ TZ=US/Central ]
|
12 | 14 | 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` |
18 | 21 | command: /usr/bin/bash
|
19 | 22 | volumes: [ .:/root/geant4 ]
|
20 | 23 | # https://unix.stackexchange.com/a/698068/26929
|
21 | 24 | # https://stackoverflow.com/a/63291253/1801749
|
22 | 25 | environment: [ TZ=US/Central ]
|
23 | 26 | hostname: AlmaLinux # https://stackoverflow.com/a/63291253/1801749
|
24 |
| - build: 11.2.1 |
| 27 | + build: 11.2.1 # docker compose build g4 |
25 | 28 | heprapp: # docker compose run --rm heprapp
|
26 | 29 | command: /usr/bin/hv # launch HepRApp
|
27 | 30 | image: physino/heprapp # https://hub.docker.com/r/physino/heprapp
|
28 | 31 | profiles: [ "heprapp" ]
|
29 | 32 | environment:
|
30 | 33 | - 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 |
31 | 37 | extra_hosts:
|
32 | 38 | - "host.docker.internal:host-gateway"
|
33 | 39 | volumes:
|
|
0 commit comments