commit 8c0ae7bf019be0563fcd0dda658e89b9ba43c5f6 Author: Arnaud G. GIBERT Date: Thu Jun 25 19:30:52 2026 +0200 - Initial release, - Based on rx3-docker/server:1.4.0-mga9, - Use orthanc 1.12.11 from Rx3 RPM, - Use docker-tools-1.5.2. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..556bc65 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*~ +*.old diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9831e7c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,77 @@ +# Rx3-Docker/Orthanc Dockerfile +#------------------------------------------------------------------------------- + +ARG IMG_FROM_URL="rx3-docker/server:latest" + +FROM ${IMG_FROM_URL} + +ARG IMG_NAME +ARG IMG_NAME_FULL +ARG IMG_VERSION +ARG IMG_MAINTAINER +ARG IMG_URL + +LABEL org.rx3.${IMG_NAME}.name=${IMG_NAME_FULL} +LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION} +LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER} +LABEL maintainer=${IMG_MAINTAINER} + +ARG ORTHANC_LIB_DIR=/var/lib/orthanc +ARG ORTHANC_HOME_DIR=${ORTHANC_LIB_DIR} +ARG ORTHANC_CONFIG_DIR=/etc/orthanc +ARG ORTHANC_CONFIG_FILE=${ORTHANC_CONFIG_DIR}/orthanc.json +ARG ORTHANC_LOG_DIR=/var/log/orthanc +ARG ORTHANC_HTTP_PORT=8042 +ARG ORTHANC_DICOM_PORT=4242 + + + +#--------------------------------------------------------------------------------------------------- +ARG ORTHANCD='#!/bin/bash \n\ + \n\ +if [[ ! -f '${ORTHANC_CONFIG_FILE}' ]] \n\ +then \n\ + cp -Rf '${ORTHANC_CONFIG_DIR}.ref/*' '${ORTHANC_CONFIG_DIR}' \n\ + \n\ + sed -i -e "s/ORTHANC_USER/${ORTHANC_USER}/" '${ORTHANC_CONFIG_FILE}' \n\ + sed -i -e "s/ORTHANC_PASSWORD/${ORTHANC_PASSWORD}/" '${ORTHANC_CONFIG_FILE}' \n\ +fi \n\ + \n\ +usermod -u ${ORTHANC_UID} orthanc \n\ +groupmod -g ${ORTHANC_GID} orthanc \n\ + \n\ +chown -R orthanc:orthanc '${ORTHANC_LIB_DIR}' '${ORTHANC_CONFIG_DIR}' '${ORTHANC_LOG_DIR} +#--------------------------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------------------------- +ARG ORTHANCD_INI='[program:orthancd] \n\ +directory='${ORTHANC_HOME_DIR}' \n\ +command=orthanc '${ORTHANC_CONFIG_FILE}' \n\ +user=orthanc \n\ +environment=USER="orthanc", HOME="'${ORTHANC_HOME_DIR}'"' +#--------------------------------------------------------------------------------------------------- + + + +RUN . /etc/profile.d/rx3.sh && isl --add ${IMG_URL} \ + && urpmi.update -a \ + && urpmi --force orthanc dcmtk \ + && sed -i -e 's/"RemoteAccessAllowed" : false,/"RemoteAccessAllowed" : true,/' ${ORTHANC_CONFIG_FILE} \ + && sed -i -e 's/\(Basic .*\)/\1\n\n "RegisteredUsers" : \{ "ORTHANC_USER" : "ORTHANC_PASSWORD" \},\n/' ${ORTHANC_CONFIG_FILE} \ + && mv ${ORTHANC_CONFIG_DIR} ${ORTHANC_CONFIG_DIR}.ref \ + && echo -e "${ORTHANCD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/orthancd \ + && chmod a+x /etc/init.d/orthancd \ + && ln -s /etc/init.d/orthancd /etc/rcD.d/S40orthancd \ + && echo -e "${ORTHANCD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/orthancd.ini + + + +VOLUME ${ORTHANC_LOG_DIR} +VOLUME ${ORTHANC_LIB_DIR} + +EXPOSE ${ORTHANC_HTTP_PORT} +EXPOSE ${ORTHANC_DICOM_PORT} + +# && useradd --home-dir ${ORTHANC_HOME_DIR} --password "" orthanc \ diff --git a/ReadMe.txt b/ReadMe.txt new file mode 100644 index 0000000..50fe775 --- /dev/null +++ b/ReadMe.txt @@ -0,0 +1,19 @@ +Welcome to Rx3-Docker/Orthanc docker image! + + + +This project aims to build a Orthanc docker image. + +Features: + - Curtently based on rx3-docker/server:1.4.0-mga9, + - Sync with Orthanc Rx3 RPM 1.12.11. + + + +Enjoy it! + +Your Rx3 Team. + +-- +arnaud@rx3.net +https://git.rx3.org/gitea/rx3-docker/orthanc diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt new file mode 100644 index 0000000..42ebc0c --- /dev/null +++ b/ReleaseNotes.txt @@ -0,0 +1,9 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3-Docker/Orthanc V 1.0.0 - A. GIBERT - 2026/06/25 +------------------------------------------------------------------------------------------------------------------------------------ + +- Initial release, +- Based on rx3-docker/server:1.4.0-mga9, +- Use orthanc 1.12.11 from Rx3 RPM, +- Use docker-tools-1.5.2. + diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..b910744 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,61 @@ +# Rx3-Docker/Orthanc Docker Image +#------------------------------------------------------------------------------- + +name: ${HOST_NAME_PREFIX} + +services: + server: + container_name: ${SV_HOST_NAME} + hostname: ${SV_HOST_NAME} + + image: ${SV_IMG_URL} + + build: + context: . + args: + IMG_NAME: ${SV_IMG_URL} + IMG_NAME_FULL: ${SV_IMG_NAME_FULL} + IMG_VERSION: ${SV_IMG_VERSION} + IMG_MAINTAINER: ${APPL_MAINTAINER} + IMG_URL: ${SV_IMG_URL} + IMG_FROM_URL: ${SV_IMG_FROM_URL} + + restart: unless-stopped + + environment: + SERVER_CROND_ENABLED: ${SV_CROND_ENABLED} + ORTHANC_UID: ${SV_USER_ID} + ORTHANC_GID: ${SV_GROUP_ID} + ORTHANC_USER: ${SV_APPL_USER} + ORTHANC_PASSWORD: ${SV_APPL_PASSWORD} + + volumes: + - ./${SV_LOG_INIT_EXT}:${SV_LOG_INIT_INT} + - ./${SV_LOG_SV_EXT}:${SV_LOG_SV_INT} + - ./${SV_LOG_MAIN_EXT}:${SV_LOG_MAIN_INT} + - ./${SV_CONF_EXT}:${SV_CONF_INT} + - ./${SV_DATA_EXT}:${SV_DATA_INT} + + networks: + - appl +# - internal + + ports: + - "127.0.0.1:${SV_PORT_SV_EXT}:${SV_PORT_SV_INT}" + - "127.0.0.1:${SV_PORT_MAIN_EXT}:${SV_PORT_MAIN_INT}" + - "127.0.0.1:${SV_PORT_DATA_EXT}:${SV_PORT_DATA_INT}" + +networks: + appl: + name: ${NETWORK_NAME} + driver: bridge + driver_opts: + com.docker.network.bridge.name: ${NETWORK_IF_NAME} +# ipam: +# config: +# - subnet: 10.2.33.0/24 +# gateway: 10.2.33.254 + +# internal: +# name: mantisbt-squashtm-internal +# external: true diff --git a/env.dist b/env.dist new file mode 100644 index 0000000..53ea418 --- /dev/null +++ b/env.dist @@ -0,0 +1,98 @@ +# Rx3-Docker/Orthanc Docker Image +#------------------------------------------------------------------------------- + +#------------------------------------------------------------------------------- +# Global Settings +#------------------------------------------------------------------------------- + +ORG_NAME="rx3-docker" +ORG_REGISTRY="docker.xor.rx3:5000" +ORG_MAINTAINER='"Arnaud G. GIBERT" ' + +ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}" + + + +#------------------------------------------------------------------------------- +# Image Settings +#------------------------------------------------------------------------------- + +APPL_NAME="orthanc" +APPL_NAME_FULL="Orthanc Server" +APPL_NAME_SHORT="orthanc" +APPL_ORG="rx3-docker" +APPL_VERSION="1.0.0" +APPL_MAINTAINER='"Arnaud G. GIBERT" ' + + + +#------------------------------------------------------------------------------- +# User Settings +#------------------------------------------------------------------------------- + +#APPL_ENV="prd" +#APPL_ENV="tst" +#APPL_ENV="int" +APPL_ENV="dvp" + + + +#------------------------------------------------------------------------------- +# Common +#------------------------------------------------------------------------------- + +if [[ "${APPL_ENV}" != "prd" ]] +then + APPL_SUFFIX="-${APPL_ENV}" + PORT_ENV_OFFSET=100 +else + APPL_SUFFIX="" + PORT_ENV_OFFSET=0 +fi + +ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}" +APPL_URL_PREFIX="${ORG_REGISTRY}/${APPL_ORG}/${APPL_NAME_SHORT}" + +HOST_NAME_PREFIX=${APPL_NAME_SHORT}${APPL_SUFFIX} + +PORT_ENV_OFFSET=0 + +PORT_SV_INT=9001 +PORT_SV_OFFSET=1000 + +NETWORK_NAME=${HOST_NAME_PREFIX} +NETWORK_IF_NAME=br-${HOST_NAME_PREFIX} + +DOCKER_TOOLS_DEBUG=FALSE +DOCKER_TOOLS_VOLUME=MIXED +#DOCKER_TOOLS_VOLUME=MERGED +DOCKER_TOOLS_EXEPTION_LIBS="postgres:pgsql" + + + +#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+----------------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+ +# | Variable | Service | Target Image | From Image | Module | Main Port | Admin Port | User | Group | +# | Prefix | Name | URL Prefix | Name | Name Full | Version | URL Prefix | Name | Version | Name | Version | Ext | Int | Ext | Int | Name / Id | Name / Id | +#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+----------------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+ + +docker_service_add SV server ${ORG_URL_PREFIX} orthanc "Rx3-Docker/Orthanc" ${APPL_VERSION}-mga9 ${ORG_URL_PREFIX} server 1.4.0-mga9 - - 8042 8042 - - apache apache + + + +#------------------------------------------------------------------------------- +# Server +#------------------------------------------------------------------------------- + +SV_CROND_ENABLED="FALSE" + +SV_CONF_EXT=./etc/${APPL_NAME} +SV_CONF_INT=/etc/${APPL_NAME} + +SV_DATA_EXT=./var/lib/${APPL_NAME} +SV_DATA_INT=/var/lib/${APPL_NAME} + +SV_PORT_DATA_EXT=4242 +SV_PORT_DATA_INT=4242 + +SV_APPL_USER="orthanc" +SV_APPL_PASSWORD="orthancadmin" diff --git a/etc/orthanc/.gitignore b/etc/orthanc/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/etc/orthanc/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/var/lib/orthanc/.gitignore b/var/lib/orthanc/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/var/lib/orthanc/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/var/log/init-server/.gitignore b/var/log/init-server/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/var/log/init-server/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/var/log/orthanc/.gitignore b/var/log/orthanc/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/var/log/orthanc/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/var/log/supervisor-server/.gitignore b/var/log/supervisor-server/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/var/log/supervisor-server/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore