move to dockerfile instead of compose

This commit is contained in:
Thephaseless 2024-07-24 15:53:02 +00:00
parent 82b34f3d09
commit 9fec26b557
3 changed files with 6 additions and 16 deletions

View File

@ -1,8 +1,7 @@
FROM mcr.microsoft.com/devcontainers/python:1-3.11-bullseye AS devcontainer FROM mcr.microsoft.com/devcontainers/python:1-3.11-bullseye
USER vscode USER vscode
RUN sudo apt update && sudo apt upgrade -y && sudo apt install -y --no-install-recommends xvfb
RUN pipx install poetry RUN pipx install poetry
RUN poetry config virtualenvs.in-project true RUN poetry config virtualenvs.in-project true
RUN sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 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 sudo apt install -y ./google-chrome-stable_current_amd64.deb

View File

@ -3,9 +3,10 @@
{ {
"name": "Python 3", "name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"dockerComposeFile": "docker-compose.yml", "build": {
"dockerfile": "Dockerfile"
},
"workspaceFolder": "/workspace/${localWorkspaceFolderBasename}", "workspaceFolder": "/workspace/${localWorkspaceFolderBasename}",
"service": "app",
"customizations": { "customizations": {
"vscode": { "vscode": {
"extensions": [ "extensions": [
@ -18,6 +19,7 @@
} }
} }
}, },
"postStartCommand": "poetry install",
// Features to add to the dev container. More info: https://containers.dev/features. // Features to add to the dev container. More info: https://containers.dev/features.
// "features": {}, // "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Use 'forwardPorts' to make a list of ports inside the container available locally.

View File

@ -1,11 +0,0 @@
services:
app:
command: sleep infinity
ports:
- 8191:8191
volumes:
- ../..:/workspace:cached
build:
target: devcontainer
selenium:
image: selenium/standalone-chromium:latest