From 934b849ada0f6e68898beeddb35166a9a6bae8c2 Mon Sep 17 00:00:00 2001 From: Adam Outler Date: Sat, 10 Jan 2026 04:11:23 +0000 Subject: [PATCH] Add selenium to devcontainer --- .devcontainer/Dockerfile | 4 ++-- .devcontainer/devcontainer.json | 2 +- .devcontainer/resources/devcontainer-Dockerfile | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 551b3593..cd10f52e 100755 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -281,7 +281,7 @@ RUN chmod +x /entrypoint.sh /root-entrypoint.sh /entrypoint.d/*.sh && \ RUN apk add --no-cache git nano vim jq php83-pecl-xdebug py3-pip nodejs sudo gpgconf pytest \ pytest-cov zsh alpine-zsh-config shfmt github-cli py3-yaml py3-docker-py docker-cli docker-cli-buildx \ - docker-cli-compose shellcheck py3-psutil + docker-cli-compose shellcheck py3-psutil chromium chromium-chromedriver # Install hadolint (Dockerfile linter) RUN curl -L https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 -o /usr/local/bin/hadolint && \ @@ -307,6 +307,6 @@ RUN mkdir -p /workspaces && \ chown netalertx:netalertx /home/netalertx && \ sed -i -e 's#/app:#/workspaces:#' /etc/passwd && \ find /opt/venv -type d -exec chmod o+rwx {} \; - + USER netalertx ENTRYPOINT ["/bin/sh","-c","sleep infinity"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 495c4aed..69e38a4a 100755 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -47,7 +47,7 @@ }, "postCreateCommand": { - "Install Pip Requirements": "/opt/venv/bin/pip3 install pytest docker debugpy", + "Install Pip Requirements": "/opt/venv/bin/pip3 install pytest docker debugpy selenium", "Workspace Instructions": "printf '\n\nļæ½ DevContainer Ready! Starting Services...\n\nšŸ“ To access /tmp folders in the workspace:\n File → Open Workspace from File → NetAlertX.code-workspace\n\nšŸ“– See .devcontainer/WORKSPACE.md for details\n\n'" }, "postStartCommand": { diff --git a/.devcontainer/resources/devcontainer-Dockerfile b/.devcontainer/resources/devcontainer-Dockerfile index 3be5f533..e65f6f80 100755 --- a/.devcontainer/resources/devcontainer-Dockerfile +++ b/.devcontainer/resources/devcontainer-Dockerfile @@ -34,9 +34,6 @@ RUN apk add --no-cache git nano vim jq php83-pecl-xdebug py3-pip nodejs sudo gpg RUN curl -L https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 -o /usr/local/bin/hadolint && \ chmod +x /usr/local/bin/hadolint -# Install Selenium for UI testing -RUN python3 -m pip install --break-system-packages selenium - RUN install -d -o netalertx -g netalertx -m 755 /services/php/modules && \ cp -a /usr/lib/php83/modules/. /services/php/modules/ && \ echo "${NETALERTX_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers