diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile index f0d33e7f4..579273788 100644 --- a/.devcontainer/Containerfile +++ b/.devcontainer/Containerfile @@ -1,4 +1,4 @@ -# Dockerfile +# Containerfile # podman image build -q -t debian:podman-trixie -f Containerfile . # podman run -q -it --rm --device /dev/fuse debian:podman-trixie # in development container e.g. @@ -12,19 +12,19 @@ RUN apt-get update && \ git && \ apt-get upgrade -y -RUN useradd vscode -s /bin/bash && \ - echo "vscode:1001:64535" > /etc/subuid && \ - echo "vscode:1001:64535" > /etc/subgid +RUN useradd webgui -s /bin/bash && \ + echo "webgui:1001:64535" > /etc/subuid && \ + echo "webgui:1001:64535" > /etc/subgid ARG _REPO_URL="https://raw.githubusercontent.com/containers/image_build/refs/heads/main/podman" ADD $_REPO_URL/containers.conf /etc/containers/containers.conf -ADD $_REPO_URL/podman-containers.conf /home/vscode/.config/containers/containers.conf +ADD $_REPO_URL/podman-containers.conf /home/webgui/.config/containers/containers.conf -RUN mkdir -p /home/vscode/.local/share/containers && \ - chown vscode:vscode -R /home/vscode && \ +RUN mkdir -p /home/webgui/.local/share/containers && \ + chown webgui:webgui -R /home/webgui && \ chmod 0644 /etc/containers/containers.conf -VOLUME /home/vscode/.local/share/containers +VOLUME /home/webgui/.local/share/containers # Replace setuid bits by proper file capabilities for uidmap binaries. # See . @@ -36,10 +36,10 @@ RUN apt-get install -y libcap2-bin && \ ENV _CONTAINERS_USERNS_CONFIGURED="" -#RUN SNIPPET="export PROMPT_COMMAND='history -a' && \ -# export HISTFILE=/commandhistory/.bash_history" && \ -# echo "$SNIPPET" >> "/root/.bashrc" +RUN SNIPPET="export PROMPT_COMMAND='history -a' && \ + export HISTFILE=/commandhistory/.bash_history" && \ + echo "$SNIPPET" >> "/root/.bashrc" -#USER vscode -#WORKDIR /home/vscode +#USER webgui +#WORKDIR /home/webgui diff --git a/.devcontainer/compose.yml b/.devcontainer/compose.yml index 0988096c5..88d121223 100644 --- a/.devcontainer/compose.yml +++ b/.devcontainer/compose.yml @@ -1,7 +1,7 @@ # compose.yml version: '3.8' -#volumes: -# projectname-bashhistory: # Define named volume for bash history +volumes: + projectname-bashhistory: # Define named volume for bash history # Note: The 'bashhistory' service is used to persist bash history data across different containers. services: @@ -18,6 +18,6 @@ services: dockerfile: Containerfile volumes: - ..:/workspace:cached # Mount parent directory to workspace - # - projectname-bashhistory:/commandhistory:z # Mount the named volume to /commandhistory in devcontainer service + - projectname-bashhistory:/commandhistory:z # Mount the named volume to /commandhistory in devcontainer service command: sleep infinity diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9fe1c661d..32ceba81b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,3 +1,4 @@ +// devcontainer.json // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/debian { @@ -11,14 +12,14 @@ "service": "devcontainer", // default workspace path in container to open - "workspaceFolder": "/workspace" //${localWorkspaceFolder}" + "workspaceFolder": "/workspace", //${localWorkspaceFolder}" // "mounts": [ // "source=projectname-bashhistory,target=/commandhistory,type=volume" // ], -// "postCreateCommand": { -// "Fix Volume Permissions": "chown -R $(whoami): /commandhistory" -// } + "postCreateCommand": { + "Fix Volume Permissions": "chown -R $(whoami): /commandhistory" + } // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, diff --git a/.devcontainer/memory/MEMORY.md b/.devcontainer/memory/MEMORY.md new file mode 100644 index 000000000..dcfb49d98 --- /dev/null +++ b/.devcontainer/memory/MEMORY.md @@ -0,0 +1 @@ +- [Uses podman not docker](user_podman.md) — uses podman and podman-compose instead of Docker diff --git a/.devcontainer/memory/user_podman.md b/.devcontainer/memory/user_podman.md new file mode 100644 index 000000000..9c61c1eba --- /dev/null +++ b/.devcontainer/memory/user_podman.md @@ -0,0 +1,8 @@ +--- +name: user_podman +description: User uses podman and podman-compose, not Docker +metadata: + type: user +--- + +Uses **podman** and **podman-compose** for containerization, not Docker/Docker Compose. Compose file format is identical but the runtime and tooling is different.