From 1ec6476ff6f257205675bf454fa8dbb20e6f5486 Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Mon, 18 Nov 2024 00:06:21 +0100 Subject: [PATCH] - Move & Rename repo from Rx3/X11-Pulse-MGA9 to Rx3-Docker/X11-Pulse, - New version naming standard, - Now use docker_tools for .env building, - Now use docker_service_add macro, - Use now rx3-docker/base:1.3.0-mga9 image, - Create src bin & dir/sbin directories. --- Dockerfile | 13 +++++---- ReadMe.txt | 10 +++---- ReleaseNotes.txt | 13 +++++++++ run.sh => bin/run.sh | 2 +- compose.yaml | 48 +++++++++++++++++--------------- env | 33 ---------------------- env.dist | 42 ++++++++++++++++++++++++++++ {sbin => src/sbin}/user_add_exec | 0 8 files changed, 93 insertions(+), 68 deletions(-) rename run.sh => bin/run.sh (81%) delete mode 100644 env create mode 100644 env.dist rename {sbin => src/sbin}/user_add_exec (100%) diff --git a/Dockerfile b/Dockerfile index 12634ec..5077205 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,20 @@ -# Rx3 X11 Pulse Mageia-9 Docker Image +# Rx3-Docker/X11-Pulse Docker Image #------------------------------------------------------------------------------- -FROM docker.xor.rx3:5000/rx3/base-mga9:1.2.6 +ARG IMG_FROM_URL="rx3-docker/base:latest" + +FROM ${IMG_FROM_URL} ARG IMG_NAME -ARG IMG_FULL_NAME +ARG IMG_NAME_FULL ARG IMG_VERSION ARG IMG_MAINTAINER -LABEL org.rx3.${IMG_NAME}.name=${IMG_FULL_NAME} +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} - ENV DISPLAY=:0 @@ -21,7 +22,7 @@ RUN urpmi --force xterm lib64jack0 lib64opencl1 pipewire-media-session lib64p #RUN passwd -d root -COPY /sbin/user_add_exec /sbin +COPY src/sbin/user_add_exec /usr/local/sbin VOLUME /home VOLUME /tmp/.X11-unix/X0 diff --git a/ReadMe.txt b/ReadMe.txt index 7ad0c19..e5599b8 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,18 +1,18 @@ -Welcome to RX3/X11-Pulse-Mga9 docker image! +Welcome to RX3-Docker/X11-Pulse docker image! -This is project aims to build a X11 + Pulse + Mageia-9 docker image able to run any graphic & audio application isolated. +This is project aims to build a X11 + Pulse docker image able to run any graphic & audio application isolated. Features: - - Curtently based on base-mga9:1.2.4 image, + - Curtently based on rx3-docker/base:1.3.0-mga9 image, - X11 & Pulse base libraries installed, - Target user & group created on the run, - Optional output internet routing. Usage: - ./run.sh [-h] [-i] [Args...] + ./bin/run.sh [-h] [-i] [Args...] Enjoy it! @@ -21,4 +21,4 @@ Your Rx3 Team. -- arnaud@rx3.net -https://git.rx3.org/gitea/rx3/x11-pulse-mga9 +https://git.rx3.org/gitea/rx3-docker/x11-pulse diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index aa77f15..6905f36 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,16 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3-Docker/X11-Pulse V 1.2.0 - A. GIBERT - 2024/11/18 +------------------------------------------------------------------------------------------------------------------------------------ + +- Move & Rename repo from Rx3/X11-Pulse-MGA9 to Rx3-Docker/X11-Pulse, +- New version naming standard, +- Now use docker_tools for .env building, +- Now use docker_service_add macro, +- Use now rx3-docker/base:1.3.0-mga9 image, +- Create bin & src/sbin directories. + + + ------------------------------------------------------------------------------------------------------------------------------------ Rx3/X11-Pulse-Mga9 V 1.1.5 - A. GIBERT - 2024/10/07 ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/run.sh b/bin/run.sh similarity index 81% rename from run.sh rename to bin/run.sh index b67a5e7..037a44f 100755 --- a/run.sh +++ b/bin/run.sh @@ -41,4 +41,4 @@ cd "${APPL_HOME_DIR}" sbin/docker_mk_env -docker compose run --rm default /sbin/user_add_exec ${USER_ID} ${USER} ${HOME} ${GROUP_ID} ${GROUP_NAME} ${APPL_DIR}/${APPL_NAME} $* +docker compose run --rm x11-pulse /usr/local/sbin/user_add_exec ${USER_ID} ${USER} ${HOME} ${GROUP_ID} ${GROUP_NAME} ${APPL_DIR}/${APPL_NAME} $* diff --git a/compose.yaml b/compose.yaml index 19e35ca..1f716fd 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,41 +1,44 @@ -# Rx3 X11 Pulse Mageia-9 Docker Image +# Rx3-Docker/X11-Pulse Docker Image #------------------------------------------------------------------------------- -name: ${IMG_NAME} +name: ${XP_IMG_NAME} services: - default: - container_name: ${IMG_NAME} + + x11-pulse: + container_name: ${XP_HOST_NAME} + hostname: ${XP_HOST_NAME} - image: ${IMG_URL} + image: ${XP_IMG_URL} build: - context: . + context: . args: - - IMG_NAME=${IMG_NAME} - - IMG_FULL_NAME=${IMG_FULL_NAME} - - IMG_VERSION=${IMG_VERSION} - - IMG_MAINTAINER=${IMG_MAINTAINER} + IMG_NAME: ${XP_IMG_NAME} + IMG_NAME_FULL: ${XP_IMG_NAME_FULL} + IMG_VERSION: ${XP_IMG_VERSION} + IMG_MAINTAINER: ${XP_IMG_MAINTAINER} + IMG_FROM_URL: ${XP_IMG_FROM_URL} - restart: unless-stopped + restart: unless-stopped environment: - DISPLAY: ":0" + DISPLAY: ":0" volumes: - home_dir:/home - - type: bind - source: /tmp/.X11-unix/X0 - target: /tmp/.X11-unix/X0 - - type: bind - source: /run/user/${USER_ID}/pulse - target: /run/user/${USER_ID}/pulse - - type: bind - source: "${APPL_DIR}" - target: "${APPL_DIR}" + - type: bind + source: /tmp/.X11-unix/X0 + target: /tmp/.X11-unix/X0 + - type: bind + source: /run/user/${USER_ID}/pulse + target: /run/user/${USER_ID}/pulse + - type: bind + source: "${APPL_DIR}" + target: "${APPL_DIR}" networks: - - ${APPL_NETWORK} + - ${APPL_NETWORK} volumes: @@ -51,4 +54,3 @@ networks: no-internet: driver: bridge internal: true # Block internet access - \ No newline at end of file diff --git a/env b/env deleted file mode 100644 index 8dd558d..0000000 --- a/env +++ /dev/null @@ -1,33 +0,0 @@ -# Rx3 X11 Pulse Mageia-9 Docker Image -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Global Settings -#------------------------------------------------------------------------------- - -IMG_ORG="rx3" -IMG_REGISTRY="docker.xor.rx3:5000" -IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}" - - - -#------------------------------------------------------------------------------- -# Image Settings -#------------------------------------------------------------------------------- - - -IMG_NAME="x11-pulse-mga9" -IMG_FULL_NAME="Rx3 X11 Pulse Mageia-9 Docker Image" -IMG_VERSION="1.1.5" -IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}" -IMG_MAINTAINER='"Arnaud G. GIBERT" ' - - - -#------------------------------------------------------------------------------- -# User Settings (overwrited at run time) -#------------------------------------------------------------------------------- - -USER_ID="" -APPL_DIR="" -APPL_NETWORK="no-internet" diff --git a/env.dist b/env.dist new file mode 100644 index 0000000..6249889 --- /dev/null +++ b/env.dist @@ -0,0 +1,42 @@ +# Rx3-Docker/X11-Pulse 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 +#------------------------------------------------------------------------------- + + +HOST_NAME_PREFIX="" + +PORT_ENV_OFFSET=0 +PORT_SV_OFFSET=1000 + + +#------------------+----------+--------------------+--------------------------+------------------------------------------+------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+ +# | Variable | Target Image | From Image | Module | Main Port | Admin Port | User | Group | +# | Prefix | URL Prefix | Name | Name Full + Version | URL Prefix | Name + Version | Name | Version | Ext | Int | Ext | Int | Name / Id | Name / Id | +#------------------+----------+--------------------+--------------------------+------------------------------------------+------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+ + +docker_service_add XP ${ORG_URL_PREFIX} x11-pulse "Rx3-Docker X11 Pulse Docker Image" 1.2.0-mga9 ${ORG_URL_PREFIX} base 1.3.0-mga9 - - - - - - - - + + + +#------------------------------------------------------------------------------- +# User Settings (overwrited at run time) +#------------------------------------------------------------------------------- + +USER_ID="" +APPL_DIR="" +APPL_NETWORK="no-internet" diff --git a/sbin/user_add_exec b/src/sbin/user_add_exec similarity index 100% rename from sbin/user_add_exec rename to src/sbin/user_add_exec