Skip to content

Commit 4e1e1ee

Browse files
authored
Update docker configurations (#10)
1 parent 7b4a000 commit 4e1e1ee

6 files changed

Lines changed: 18 additions & 34 deletions

File tree

‎.devcontainer/Dockerfile‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/
1111
# Just Installation
1212
COPY --from=ghcr.io/casey/just:latest /just /usr/local/bin/
1313

14-
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
15-
COPY ./languages/python/requirements.txt /tmp/pip-tmp/
16-
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
17-
&& rm -rf /tmp/pip-tmp
14+
# uv Installation
15+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
1816

1917
# [Optional] Uncomment this section to install additional OS packages.
2018
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
@@ -23,6 +21,3 @@ RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requ
2321
# [Optional] Uncomment this line to install global node packages.
2422
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
2523

26-
# Aliases
27-
28-
RUN echo "alias lint='pycodestyle * && pylint *'" >> /etc/bash.bashrc

‎.devcontainer/devcontainer.json‎

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
1010
// Append -bullseye or -buster to pin to an OS version.
1111
// Use -bullseye variants on local on arm64/Apple Silicon.
12-
"VARIANT": "3.10-bullseye",
12+
"VARIANT": "3.14-bullseye",
1313
// Options
1414
"NODE_VERSION": "none"
1515
}
@@ -21,27 +21,15 @@
2121
// Set *default* container specific settings.json values on container create.
2222
"settings": {
2323
"python.autoComplete.extraPaths": ["/workspaces"],
24-
"python.defaultInterpreterPath": "/usr/local/bin/python",
25-
"python.linting.enabled": true,
26-
"python.linting.pycodestyleEnabled": true,
27-
"python.linting.pylintEnabled": true,
28-
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
29-
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
30-
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
31-
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
32-
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
33-
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
34-
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
35-
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
36-
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
24+
"python.defaultInterpreterPath": "/usr/local/bin/python"
3725
},
3826

3927
// Add the IDs of extensions you want installed when the container is created.
4028
"extensions": [
41-
"ms-python.pylint",
4229
"ms-python.vscode-pylance",
4330
"ms-python.python",
44-
"Anthropic.claude-code"
31+
"Anthropic.claude-code",
32+
"charliermarsh.ruff"
4533
]
4634
}
4735
},
@@ -50,7 +38,7 @@
5038
// "forwardPorts": [],
5139

5240
// Use 'postCreateCommand' to run commands after the container is created.
53-
"postCreateCommand": "pip install --upgrade pip; pip install --user -r requirements.txt",
41+
"postCreateCommand": "uv sync --all-groups",
5442

5543
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
5644
"remoteUser": "vscode",

‎.vscode/extensions.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"DavidAnson.vscode-markdownlint",
44
"ms-python.python",
55
"ms-python.vscode-pylance",
6-
"ms-vscode-remote.remote-containers"
6+
"ms-vscode-remote.remote-containers",
7+
"charliermarsh.ruff"
78
]
89
}

‎.vscode/settings.json‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,13 @@
22
"editor.tabSize": 4,
33
"files.autoSave": "afterDelay",
44
"files.trimTrailingWhitespace": true,
5-
"terminal.integrated.localEchoStyle": "dim"
5+
"terminal.integrated.localEchoStyle": "dim",
6+
"[python]": {
7+
"editor.defaultFormatter": "charliermarsh.ruff",
8+
"editor.formatOnSave": true,
9+
"editor.codeActionsOnSave": {
10+
"source.fixAll.ruff": "explicit",
11+
"source.organizeImports.ruff": "explicit"
12+
}
13+
}
614
}

‎requirements.txt‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎setup.cfg‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)