From 268e7290d35b1991406d83c9963b264528ca2a3f Mon Sep 17 00:00:00 2001 From: Ruben Suarez Date: Tue, 4 Feb 2020 08:47:15 +0100 Subject: [PATCH] Allow host shared memory --- README.md | 8 +++++++- run.sh | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ce6c303..e935fde 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,11 @@ prepare_docker_printer_host_sharing() { ENV_VARS+=" --env CUPS_SERVER=/run/cups/cups.sock" } +prepare_docker_ipc_host_sharing() { + # Allow shared memory to avoid RAM access failures and rendering glitches due to X extesnion MIT-SHM + EXTRA+=" --ipc=host" +} + prepare_docker_x11_host_sharing() { # X11 Unix-domain socket MOUNTS+=" --mount type=bind,source=/tmp/.X11-unix,target=/tmp/.X11-unix" @@ -151,6 +156,7 @@ prepare_docker_sound_host_sharing prepare_docker_webcam_host_sharing prepare_docker_gpu_host_sharing prepare_docker_printer_host_sharing +prepare_docker_ipc_host_sharing prepare_docker_x11_host_sharing prepare_docker_hostname_host_sharing prepare_docker_nvidia_drivers_install @@ -171,7 +177,7 @@ docker run --rm -it \ This way, the internal user UID an group GID are changed to the current host user:group launching the container and the existing files under his internal HOME directory that where owned by user and group are also updated to belong to the new UID:GID. -Functions prepare_docker_dbus_host_sharing, prepare_docker_xdg_runtime_dir_host_sharing, prepare_docker_sound_host_sharing, prepare_docker_webcam_host_sharing, prepare_docker_gpu_host_sharing, prepare_docker_printer_host_sharing, prepare_docker_x11_host_sharing and prepare_docker_hostname_host_sharing allows sharing your host resources with the running container as GUI apps can interact with your host system as they where installed in the host. +Functions prepare_docker_dbus_host_sharing, prepare_docker_xdg_runtime_dir_host_sharing, prepare_docker_sound_host_sharing, prepare_docker_webcam_host_sharing, prepare_docker_gpu_host_sharing, prepare_docker_printer_host_sharing, prepare_docker_ipc_host_sharing, prepare_docker_x11_host_sharing and prepare_docker_hostname_host_sharing allows sharing your host resources with the running container as GUI apps can interact with your host system as they where installed in the host. Function prepare_docker_nvidia_drivers_install allows the nvidia drivers host version to be installed on container. diff --git a/run.sh b/run.sh index d2a3d6e..6225f82 100755 --- a/run.sh +++ b/run.sh @@ -75,6 +75,11 @@ prepare_docker_printer_host_sharing() { ENV_VARS+=" --env CUPS_SERVER=/run/cups/cups.sock" } +prepare_docker_ipc_host_sharing() { + # Allow shared memory to avoid RAM access failures and rendering glitches due to X extesnion MIT-SHM + EXTRA+=" --ipc=host" +} + prepare_docker_x11_host_sharing() { # X11 Unix-domain socket MOUNTS+=" --mount type=bind,source=/tmp/.X11-unix,target=/tmp/.X11-unix" @@ -107,6 +112,7 @@ prepare_docker_sound_host_sharing prepare_docker_webcam_host_sharing prepare_docker_gpu_host_sharing prepare_docker_printer_host_sharing +prepare_docker_ipc_host_sharing prepare_docker_x11_host_sharing prepare_docker_hostname_host_sharing prepare_docker_nvidia_drivers_install