I'm trying to replicate a command for docker-compose for orthanc that I previously ran as a Docker command in the command line and I'm having some trouble translating it
The docker command is:
docker run -p 4242:4242 -p 8042:8042 -e OSIMIS_WEB_VIEWER1_PLUGIN_ENABLED=true --network=host --rm -v /orthanc.json:/etc/orthanc/orthanc.json:ro -v /tmp/orthanc-db/:/var/lib/orthanc/db/ osimis/orthanc
How can I translate this for docker-compose?
Here you go
version: "3.7"
services:
orthanc:
image: osimis/orthanc
ports:
- 4242:4242
- 8042:8042
environment:
OSIMIS_WEB_VIEWER1_PLUGIN_ENABLED: "true"
network_mode: host
volumes:
- /orthanc.json:/etc/orthanc/orthanc.json:ro
- /tmp/orthanc-db/:/var/lib/orthanc/db/
Worth noting that the --rm
flag can't really be replicated (as far as I know).
Also true
in the environment variable must enclosed in quotes like "true"
to prevent it from being a yaml boolean value.
Once that's in a docker-compose.yml
you can run it with docker-compose run orthanc
or docker-compose up
.