Skip to content

Commit

Permalink
Development: Add devcontainer for vscode users
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksei Stepanov committed Feb 19, 2024
1 parent 062ad40 commit 2e9eb60
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .devcontainer/dev.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.12
RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y python3-gi gobject-introspection libgirepository1.0-dev \
&& apt-get clean
RUN mkdir -p ~/.virtualenvs \
&& pip3 install virtualenv \
&& /usr/local/bin/virtualenv -p /usr/local/bin/python3 --download ~/.virtualenvs/urwid
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"build": {
"dockerfile": "dev.dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/github-cli": {}
},
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"python.venvPath": "~/.virtualenvs",
"python.terminal.activateEnvInCurrentTerminal": true,
"python.defaultInterpreterPath": "~/.virtualenvs/urwid/bin/python",
"python.testing.unittestEnabled": true
},
"extensions": [
"ms-python.python",
"ms-python.debugpy",
"ms-python.vscode-pylance",
"ms-python.isort",
"ms-python.black-formatter",
"charliermarsh.ruff",
"ms-azuretools.vscode-docker",
"GitHub.vscode-github-actions"
]
}
},
"name": "urwid-dev",
"containerUser": "root",
"init": true,
"postCreateCommand": "~/.virtualenvs/urwid/bin/pip3 install isort black ruff pylint refurb mypy",
"postStartCommand": "~/.virtualenvs/urwid/bin/pip3 install -r test_requirements.txt PyGObject && ~/.virtualenvs/urwid/bin/pip3 install -U -e ."
}
1 change: 1 addition & 0 deletions .dockerignore

0 comments on commit 2e9eb60

Please sign in to comment.