8 Commits

Author SHA1 Message Date
472a94caed - Use now rx3-docker/base:1.3.6-mga9 image,
- Rebuild for updates.
2025-11-29 11:32:12 +01:00
b70332a608 - Improve run.sh to allow direct call with appl full path in one argument. 2025-11-06 16:28:11 +01:00
1935ad1b30 - Use now rx3-docker/base:1.3.5-mga9 image,
- Rebuild for updates.
2025-09-19 23:30:32 +02:00
8fbec958ed - Fix Application Dir spaces support. 2025-04-21 12:26:02 +02:00
3b58d3e99d - Add glinfo command. 2025-04-14 18:17:30 +02:00
5dfd1063e4 - Add absolute & relative command path support,
- Add spaces support in Application Dir & Command.
2025-04-14 14:14:02 +02:00
5ab68d4e8e - Use now rx3-docker/base:1.3.2-mga9 image,
- Add "urpmi.update -a" to force mirror sync.
2025-04-13 11:10:59 +02:00
15fedccb99 - Use now rx3-docker/base:1.3.1-mga9 image,
- Fix some env.dist variables,
- Improve network naming.
2025-03-08 19:05:51 +01:00
7 changed files with 129 additions and 29 deletions

View File

@@ -18,7 +18,8 @@ LABEL maintainer=${IMG_MAINTAINER}
ENV DISPLAY=:0
RUN urpmi --force xterm lib64jack0 lib64opencl1 pipewire-media-session lib64proxy-webkit hunspell-en lib64xcb-xkb1 lib64xcomposite1 lib64xcursor1 lib64xdamage1 lib64xft-gir2.0 lib64xi6 lib64xinerama1 lib64xkbcommon0 lib64vulkan-loader1 lib64xlib-gir2.0 lib64xrandr2 lib64xmlb2 lib64xslt1 libexif12-common libgxps-tools frozen-bubble
RUN urpmi.update -a \
&& urpmi --force xterm lib64jack0 lib64opencl1 pipewire-media-session lib64proxy-webkit hunspell-en lib64xcb-xkb1 lib64xcomposite1 lib64xcursor1 lib64xdamage1 lib64xft-gir2.0 lib64xi6 lib64xinerama1 lib64xkbcommon0 lib64vulkan-loader1 lib64xlib-gir2.0 lib64xrandr2 lib64xmlb2 lib64xslt1 libexif12-common libgxps-tools frozen-bubble glxinfo
#RUN passwd -d root

View File

@@ -5,14 +5,14 @@ Welcome to RX3-Docker/X11-Pulse docker image!
This is project aims to build a X11 + Pulse docker image able to run any graphic & audio application isolated.
Features:
- Curtently based on rx3-docker/base:1.3.0-mga9 image,
- Curtently based on rx3-docker/base:1.3.6-mga9 image,
- X11 & Pulse base libraries installed,
- Target user & group created on the run,
- Optional output internet routing.
Usage:
./bin/run.sh [-h] [-i] <Application Dir> <Application Exec> [Args...]
./bin/run.sh [-h] [-i] [<Application_Dir> <Application_Exec> | <Application_Exec>] [Args...]
Enjoy it!

View File

@@ -1,3 +1,59 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/X11-Pulse V 1.2.6 - A. GIBERT - 2025/11/29
------------------------------------------------------------------------------------------------------------------------------------
- Improve run.sh to allow direct call with appl full path in one argument,
- Use now rx3-docker/base:1.3.6-mga9 image,
- Rebuild for updates.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/X11-Pulse V 1.2.5 - A. GIBERT - 2025/09/19
------------------------------------------------------------------------------------------------------------------------------------
- Use now rx3-docker/base:1.3.5-mga9 image,
- Rebuild for updates.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/X11-Pulse V 1.2.4 - A. GIBERT - 2025/04/21
------------------------------------------------------------------------------------------------------------------------------------
- Fix Application Dir spaces support.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/X11-Pulse V 1.2.3 - A. GIBERT - 2025/04/14
------------------------------------------------------------------------------------------------------------------------------------
- Add absolute & relative command path support,
- Add spaces support in Application Dir & Command,
- Add glinfo command.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/X11-Pulse V 1.2.2 - A. GIBERT - 2025/04/13
------------------------------------------------------------------------------------------------------------------------------------
- Use now rx3-docker/base:1.3.2-mga9 image,
- Add "urpmi.update -a" to force mirror sync.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/X11-Pulse V 1.2.1 - A. GIBERT - 2025/03/08
------------------------------------------------------------------------------------------------------------------------------------
- Use now rx3-docker/base:1.3.1-mga9 image,
- Fix some env.dist variables,
- Improve network naming.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/X11-Pulse V 1.2.0 - A. GIBERT - 2024/11/18
------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -10,7 +10,7 @@ APPL_HOME_DIR="$(dirname "$(dirname "$0")")"
if [[ "$1" == "-h" ]]
then
echo "usage: run.sh [-h] [-i] <Application_Dir> <Application_Exec> [Args...]"
echo "usage: run.sh [-h] [-i] [<Application_Dir> <Application_Exec> | <Application_Exec>] [Args...]"
echo "with -i enabling internet access."
exit 0
@@ -24,14 +24,24 @@ else
export APPL_NETWORK="no-internet"
fi
export APPL_DIR="$1"
shift
if [[ -d "$1" ]]
then
export APPL_DIR="$1"
shift
export APPL_NAME="$1"
shift
export APPL_NAME="$1"
shift
else
export APPL_DIR="$( dirname $1)"
export APPL_NAME="./$(basename $1)"
shift
fi
APPL_DIR=$(realpath "${APPL_DIR}")
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
export GROUP_NAME=$(id -gn)
@@ -41,4 +51,6 @@ cd "${APPL_HOME_DIR}"
sbin/docker_mk_env
docker compose run --rm x11-pulse /usr/local/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}" "$@"
docker compose down

View File

@@ -5,6 +5,8 @@ name: ${XP_IMG_NAME}
services:
#-------------------------------------------------------------------------------
x11-pulse:
container_name: ${XP_HOST_NAME}
hostname: ${XP_HOST_NAME}
@@ -23,10 +25,11 @@ services:
restart: unless-stopped
environment:
DISPLAY: ":0"
DISPLAY: "${DISPLAY}"
volumes:
- home_dir:/home
# - home_dir:/home
- /opt/vm/home:/home
- type: bind
source: /tmp/.X11-unix/X0
target: /tmp/.X11-unix/X0
@@ -46,11 +49,20 @@ volumes:
external: true
#-------------------------------------------------------------------------------
networks:
internet:
name: ${NETWORK_NAME}-internet
driver: bridge
internal: false # Allow internet access
driver_opts:
com.docker.network.bridge.name: ${NETWORK_IF_NAME}
no-internet:
name: ${NETWORK_NAME}-no-internet
driver: bridge
internal: true # Block internet access
driver_opts:
com.docker.network.bridge.name: ${NETWORK_IF_NAME}

View File

@@ -17,19 +17,36 @@ ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
# Image Settings
#-------------------------------------------------------------------------------
APPL_NAME="x11-pulse"
APPL_NAME_FULL="X11-Pulse Docker Image"
APPL_NAME_SHORT="x11-pulse"
APPL_VERSION="1.2.6"
HOST_NAME_PREFIX=""
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-${NETWORK_NAME}
#------------------+----------+--------------------+--------------------------+------------------------------------------+------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
# | 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_TOOLS_DEBUG=FALSE
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 - - - - - - - -
DOCKER_TOOLS_VOLUME=SINGLE
#DOCKER_TOOLS_VOLUME=MIXED
#DOCKER_TOOLS_VOLUME=MERGED
#DOCKER_TOOLS_VOLUME=SPLIT
#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 XP x11-pulse ${ORG_URL_PREFIX} - "Rx3-Docker/X11-Pulse" ${APPL_VERSION}-mga9 ${ORG_URL_PREFIX} base 1.3.6-mga9 - - - - - - - -

View File

@@ -1,23 +1,24 @@
#!/bin/bash
for arg in User_Id User_Name Home_Dir Group_Id Group_Name
for arg in User_Id User_Name Home_Dir Group_Id Group_Name Appl_Dir
do
declare "$arg"=$1
declare "$arg"="$1"
shift
done
Cmd=$( printf " %q" "$@" | sed -e 's/^ //' -e 's/\\;/;/g')
echo "User Add & Exec: User_Id: (${User_Id}) User_Name: [${User_Name}] Home_Dir: [${Home_Dir}] Group_Id: (${Group_Id}) Group_Name: [${Group_Name}]"
echo -n " Display: [${DISPLAY}] Cmd: [$1]"
echo "User Add & Exec: User_Id: (${User_Id}) User_Name: [${User_Name}] Home_Dir: [${Home_Dir}] Group_Id: (${Group_Id}) Group_Name: [${Group_Name}] Appl_Dir: [${Appl_Dir}]"
echo -n " Display: [${DISPLAY}] Cmd: [${Cmd}]"
i=2
#i=2
while [[ $i -le $# ]]
do
echo -n " [${!i}]"
i=$(($i + 1))
done
#while [[ $i -le $# ]]
#do
# echo -n " [${!i}]"
# i=$(($i + 1))
#done
echo ""
echo ""
@@ -46,8 +47,9 @@ chown ${User_Name}:${Group_Name} /run/user/${User_Id}
echo "Exec Cmd..."
#echo "su - -P ${User_Name} -c \"$*\""
su - -P ${User_Name} -c "$*"
su - -P ${User_Name} -c "cd \"${Appl_Dir}\"; ${Cmd}"
echo "Completed!"