From 92e04ccdc0a56f51b8115f0c23a7da3b79361a0e Mon Sep 17 00:00:00 2001 From: Derek Ditch Date: Thu, 22 Jun 2023 17:06:34 +0000 Subject: [PATCH 1/2] fix: Updates devcontainer - Current pip3 refuses to install to system, uses venv instead - Mounting folder on SELinux systems fails without Z flag. This flag is ignored on non-SELinux systems. --- .devcontainer/recommended-Dockerfile | 12 ++++++++---- .devcontainer/recommended-devcontainer.json | 9 ++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.devcontainer/recommended-Dockerfile b/.devcontainer/recommended-Dockerfile index e20fc36e..3cb7cae9 100644 --- a/.devcontainer/recommended-Dockerfile +++ b/.devcontainer/recommended-Dockerfile @@ -4,13 +4,17 @@ RUN apt update RUN apt upgrade -y -RUN apt install python3 zsh -y +RUN apt install python3 python3-venv zsh -y + RUN wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O - | zsh || true RUN yarn install -RUN pip3 install -r ../docs/requirements.txt -RUN pip3 install sphinx +RUN python3 -m venv /opt/venv; mkdir /workspace + +COPY docs/requirements.txt /workspace/ +RUN /opt/venv/bin/pip3 install -r /workspace/requirements.txt +RUN /opt/venv/bin/pip3 install sphinx -CMD ["zsh"] +CMD . /opt/venv/bin/activate && exec zsh diff --git a/.devcontainer/recommended-devcontainer.json b/.devcontainer/recommended-devcontainer.json index a99b5ef5..ca07ee8f 100644 --- a/.devcontainer/recommended-devcontainer.json +++ b/.devcontainer/recommended-devcontainer.json @@ -1,6 +1,13 @@ { "name": "Atomic Calendar Revive", - "dockerFile": "Dockerfile", + "build": { + "context": "..", + "dockerfile": "Dockerfile" + }, + "workspaceMount": "", + "runArgs": [ + "--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z" + ], "context": "..", "appPorts": [ 5000 From a278b8dd3527634e2f31d30cdbcd3368e7645908 Mon Sep 17 00:00:00 2001 From: Derek Ditch Date: Mon, 26 Jun 2023 01:44:04 +0000 Subject: [PATCH 2/2] Remove Z flag as it fails on macOS --- .devcontainer/recommended-devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/recommended-devcontainer.json b/.devcontainer/recommended-devcontainer.json index ca07ee8f..45055345 100644 --- a/.devcontainer/recommended-devcontainer.json +++ b/.devcontainer/recommended-devcontainer.json @@ -6,7 +6,7 @@ }, "workspaceMount": "", "runArgs": [ - "--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z" + "--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}" ], "context": "..", "appPorts": [ @@ -33,4 +33,4 @@ "editor.formatOnType": true, "files.trimTrailingWhitespace": true } -} +} \ No newline at end of file