diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8c9d282..3d386cd 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,8 +1,26 @@ -FROM mcr.microsoft.com/devcontainers/python:1-3.12-bullseye +FROM python:3.12 + +# Inspired by https://github.com/Hudrolax/uc-docker-alpine/ + +# Install build dependencies +RUN apt update && apt upgrade -y && apt install -y\ + curl \ + wget \ + unzip \ + gnupg \ + bash \ + stow + +# Install dependencies +RUN apt install -y \ + xvfb \ + x11vnc \ + fluxbox \ + xterm \ + git \ + ca-certificates \ + pipx \ + chromium -USER vscode RUN pipx install poetry -RUN poetry config virtualenvs.in-project true -RUN sudo apt update && sudo apt upgrade -y -RUN sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -RUN sudo apt install -y ./google-chrome-stable_current_amd64.deb +# RUN poetry config virtualenvs.in-project true \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 003d471..d7d1b28 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,7 +6,10 @@ "build": { "dockerfile": "Dockerfile" }, - "runArgs": ["-p", "8181:8191"], + "runArgs": [ + "-p", + "8181:8191" + ], "customizations": { "vscode": { "extensions": [ @@ -19,19 +22,17 @@ } } }, - "postStartCommand": "poetry install", + // "postStartCommand": "poetry install", // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [6080], - "features": { - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, - "ghcr.io/devcontainers/features/desktop-lite:1": {} - } + "forwardPorts": [ + 5900 + ] // Use 'postCreateCommand' to run commands after the container is created. // "postCreateCommand": "pip3 install --user -r requirements.txt", // Configure tool-specific properties. // "customizations": {}, // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" -} +} \ No newline at end of file