From be6d12070d936379f681e8aa69a27ade3272a880 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 3 Sep 2023 19:53:58 -0300 Subject: [PATCH] Re-organize directory structure --- base/arch.Dockerfile | 23 +++++++++++++++++++++++ scripts/wsl_start.ps1 | 14 ++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 base/arch.Dockerfile create mode 100644 scripts/wsl_start.ps1 diff --git a/base/arch.Dockerfile b/base/arch.Dockerfile new file mode 100644 index 0000000..01fe0f0 --- /dev/null +++ b/base/arch.Dockerfile @@ -0,0 +1,23 @@ +# OSIC Stacks - osicstack-base-arch +# Base image for OSIC Stacks +FROM greyltc/archlinux-aur:paru + +# Update packages +RUN pacman -Syuq --noconfirm + +# Install packages +RUN aur-install sudo git python python-pipx xz gnu-free-fonts + +# Install volare +ENV PATH="${PATH}:/root/.local/bin" +RUN pipx install volare + +# Clean cache +RUN pacman -Scc + +# Add main user +RUN useradd -m designer +RUN echo "designer ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/designer + +# Initialize the enviroment keeping container alive +CMD ["sleep", "infinity"] \ No newline at end of file diff --git a/scripts/wsl_start.ps1 b/scripts/wsl_start.ps1 new file mode 100644 index 0000000..b771c06 --- /dev/null +++ b/scripts/wsl_start.ps1 @@ -0,0 +1,14 @@ +$imagename = Read-Host -Prompt 'Container image to initialize' +$containername = Read-Host -Prompt 'Container instance name [default=$imagename]' +if (!$containername) { $containername = $imagename } + +$command = ("docker run -d " + + "--name "+ $containername + " " + + "-v /tmp/.X11-unix:/tmp/.X11-unix " + + "-v /mnt/wslg:/mnt/wsl " + + "-e WAYLAND_DISPLAY=`$WAYLAND_DISPLAY " + + "-e DISPLAY=`$DISPLAY " + + "-e XDG_RUNTIME_DIR=/mnt/wslg " + + $imagename) + +wsl bash -ic $command \ No newline at end of file