Orthanc install on a NIX node
Orthanc is a shareware DICOM server. For installation, the docker infrastructure is available.
Docker install on debian
So start with commands suggested by docker install guides:
#unload old installation
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
#install requirements for download and installation
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
#add official docker repository to get the latest version
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
sudo apt-get update
#install software
sudo apt-get install docker-ce docker-ce-cli containerd.io
#test installation
sudo docker run hello-world
For configuration also docker-compose
is needed, which is installed via:
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
Installation and configuration of Orthanc
Make a new orthanc user:
adduser --ingroup docker orthanc
The orthanc docker will be run by the orthanc user. All configuration is stored in the /home/orthanc/config
area.
First create a template configuration file:
docker run --rm --entrypoint=cat jodogne/orthanc /etc/orthanc/orthanc.json > $HOME/config/orthanc.json
The minimum configuration should correct values:
{
"Name":"NIXLJUOIL PACS server",
"HttpPort": 8042,
"DicomAet":"NIXLJUOIL",
"DicomPort":11112
}
I kept http ports at standard value, but changed Dicom port to 11112 which is similar to slicer based ports.
The full server is managed by docker-compose configuration file with volume persistance in /data/dicom/orthanc/db
:
version: '3.1' # Secrets are only available since this version of Docker Compose
services:
orthanc:
image: jodogne/orthanc-plugins:1.6.1
command: /run/secrets/ # Path to the configuration files (stored as secrets)
ports:
- 11112:11112
- 8042:8042
secrets:
- orthanc.json
volumes:
- /data/dicom/orthanc/db:/var/lib/orthanc/db
secrets:
orthanc.json:
file: orthanc.json
The docker-compose installation is performed by:
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
#testi if it works
docker-compose --version
Running orthanc
Become orthanc:
su nixManager
sudo su orthanc
Start server:
#start
docker-compose -f $HOME/config/orthanc-compose.yaml up -d
#stop
docker-compose -f $HOME/config/orthanc-compose.yaml down -d
#check for running instances
docker-compose -f $HOME/config/orthanc-compose.yaml ps
Also in shorthand
bin/startOrthanc.sh
bin/stopOrthanc.sh