diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index fddc5803f..cb39f0bb9 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -220,7 +220,8 @@ ENV PYDEVD_DISABLE_FILE_VALIDATION=1 COPY .devcontainer/resources/devcontainer-overlay/ / USER root # Install common tools, create user, and set up sudo -RUN apk add --no-cache git nano vim jq php83-pecl-xdebug py3-pip nodejs sudo gpgconf pytest pytest-cov fish shfmt github-cli py3-yaml py3-docker-py +RUN apk add --no-cache git nano vim jq php83-pecl-xdebug py3-pip nodejs sudo gpgconf pytest \ + pytest-cov fish shfmt github-cli py3-yaml py3-docker-py docker-cli RUN install -d -o netalertx -g netalertx -m 755 /services/php/modules && \ @@ -229,6 +230,8 @@ RUN install -d -o netalertx -g netalertx -m 755 /services/php/modules && \ RUN mkdir /workspaces && \ install -d -o netalertx -g netalertx -m 777 /services/run/logs && \ install -d -o netalertx -g netalertx -m 777 /app/run/tmp/client_body && \ - sed -i -e 's|:/app:|:/workspaces:|' /etc/passwd + sed -i -e 's|:/app:|:/workspaces:|' /etc/passwd && \ + find /opt/venv -type d -exec chmod o+rw {} \; + USER netalertx ENTRYPOINT ["/bin/sh","-c","sleep infinity"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3cbfd89e8..4628c2ba5 100755 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -43,6 +43,7 @@ } }, + "postCreateCommand": "pip install pytest docker", "postStartCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/setup.sh", "customizations": { diff --git a/.devcontainer/resources/devcontainer-Dockerfile b/.devcontainer/resources/devcontainer-Dockerfile index 1952b8162..352d874d3 100755 --- a/.devcontainer/resources/devcontainer-Dockerfile +++ b/.devcontainer/resources/devcontainer-Dockerfile @@ -17,7 +17,8 @@ ENV PYDEVD_DISABLE_FILE_VALIDATION=1 COPY .devcontainer/resources/devcontainer-overlay/ / USER root # Install common tools, create user, and set up sudo -RUN apk add --no-cache git nano vim jq php83-pecl-xdebug py3-pip nodejs sudo gpgconf pytest pytest-cov fish shfmt github-cli py3-yaml py3-docker-py +RUN apk add --no-cache git nano vim jq php83-pecl-xdebug py3-pip nodejs sudo gpgconf pytest \ + pytest-cov fish shfmt github-cli py3-yaml py3-docker-py docker-cli RUN install -d -o netalertx -g netalertx -m 755 /services/php/modules && \ @@ -27,7 +28,7 @@ RUN mkdir /workspaces && \ install -d -o netalertx -g netalertx -m 777 /services/run/logs && \ install -d -o netalertx -g netalertx -m 777 /app/run/tmp/client_body && \ sed -i -e 's|:/app:|:/workspaces:|' /etc/passwd && \ - find /opt/venv -type d -exec chmod o+rw {} + && \ - pip install pytest docker + find /opt/venv -type d -exec chmod o+rw {} \; + USER netalertx ENTRYPOINT ["/bin/sh","-c","sleep infinity"]