Skip to content

Commit 97ca8d0

Browse files
committed
Clean up devcontainer environment
1 parent a3b4783 commit 97ca8d0

File tree

3 files changed

+54
-31
lines changed

3 files changed

+54
-31
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM mcr.microsoft.com/devcontainers/python:3.11
2+
3+
RUN \
4+
pipx uninstall pydocstyle \
5+
&& pipx uninstall pycodestyle \
6+
&& pipx uninstall mypy \
7+
&& pipx uninstall pylint \
8+
&& pipx uninstall pytest \
9+
&& pipx uninstall flake8 \
10+
&& pipx uninstall black
11+
12+
ENV SHELL /bin/bash

.devcontainer/devcontainer.json

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,50 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/python
33
{
4-
"name": "Python 3",
5-
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/python:0-3.9",
7-
"features": {
8-
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
9-
"plugins": "ssh-agent",
10-
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions"
11-
}
12-
},
4+
"name": "Python 3",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"dockerFile": "./Dockerfile",
7+
"context": "..",
8+
"features": {
9+
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
10+
"plugins": "ssh-agent",
11+
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions"
12+
}
13+
},
1314

14-
// Features to add to the dev container. More info: https://containers.dev/features.
15-
// "features": {},
15+
// Features to add to the dev container. More info: https://containers.dev/features.
16+
// "features": {},
1617

17-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
18-
// "forwardPorts": [],
18+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
19+
// "forwardPorts": [],
1920

20-
// Use 'postCreateCommand' to run commands after the container is created.
21-
// "postCreateCommand": "pip3 install -Ur requirements-dev.txt",
22-
"postStartCommand": "pip3 install -Ur requirements-dev.txt",
23-
// Configure tool-specific properties.
24-
// "customizations": {},
21+
// Use 'postCreateCommand' to run commands after the container is created.
22+
// "postCreateCommand": "pip3 install -Ur requirements-dev.txt",
23+
"postCreateCommand": "pip3 install -Ur requirements-dev.txt",
24+
// Configure tool-specific properties.
25+
// "customizations": {},
2526

26-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
27-
"remoteUser": "root",
28-
"customizations": {
29-
"vscode": {
30-
"extensions": [
31-
"tamasfe.even-better-toml",
32-
"ms-python.python",
33-
"ms-python.vscode-pylance",
34-
"EditorConfig.EditorConfig"
35-
]
36-
}
37-
}
27+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
28+
// "remoteUser": "root",
29+
"customizations": {
30+
"vscode": {
31+
"extensions": [
32+
"tamasfe.even-better-toml",
33+
"ms-python.python",
34+
"ms-python.vscode-pylance",
35+
"EditorConfig.EditorConfig",
36+
"GitHub.vscode-pull-request-github"
37+
],
38+
"settings": {
39+
"python.pythonPath": "/usr/local/bin/python",
40+
"python.testing.pytestArgs": ["--no-cov"],
41+
"terminal.integrated.profiles.linux": {
42+
"zsh": {
43+
"path": "/usr/bin/zsh"
44+
}
45+
},
46+
"terminal.integrated.defaultProfile.linux": "zsh"
47+
}
48+
}
49+
}
3850
}

.vscode/extensions.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"recommendations": [
3-
"github.vscode-github-actions",
43
"github.vscode-pull-request-github"
54
]
65
}

0 commit comments

Comments
 (0)