Skip to content

Commit 87cfd88

Browse files
committed
Dev container and .gitignore in folder
1 parent cb175d4 commit 87cfd88

4 files changed

Lines changed: 59 additions & 1 deletion

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@
55
**/__pycache__
66
**/.env
77
.DS_Store
8-
**/.client_secret
8+
**/.client_secret
9+
**/.pytest_cache
10+
.mypy_cache
11+
.ruff_cache
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.11
2+
3+
# Add non-root user for security
4+
ARG USERNAME=nonroot
5+
RUN groupadd --gid 1000 $USERNAME && useradd --uid 1000 --gid 1000 -m $USERNAME
6+
## Make sure to reflect new user in PATH
7+
ENV PATH="/home/${USERNAME}/.local/bin:${PATH}"
8+
USER $USERNAME
9+
10+
# Install pre-requirements
11+
RUN pip install pip~=23.3.2 setuptools~=69.0.3
12+
13+
COPY requirements.txt ./
14+
RUN pip install -r requirements.txt
15+
16+
COPY dev_requirements.txt ./
17+
RUN pip install -r dev_requirements.txt
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"build": {
3+
"dockerfile": "Dockerfile",
4+
"context": ".."
5+
},
6+
"remoteUser": "nonroot",
7+
"customizations": {
8+
"vscode": {
9+
"extensions": [
10+
"ms-python.python",
11+
"ms-python.mypy-type-checker",
12+
"charliermarsh.ruff"
13+
],
14+
"settings": {
15+
"python.testing.pytestArgs": [
16+
"."
17+
],
18+
"python.testing.unittestEnabled": false,
19+
"python.testing.pytestEnabled": true,
20+
"python.editor.defaultFormatter": "charliermarsh.ruff",
21+
"python.linting.mypy": true,
22+
"python.linting.enabled": true,
23+
"explorer.excludeGitIgnore": true
24+
}
25+
}
26+
}
27+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.idea
2+
.vscode
3+
**/.venv/
4+
**/*.egg-info
5+
**/__pycache__
6+
**/.env
7+
.DS_Store
8+
**/.client_secret
9+
**/.pytest_cache
10+
.mypy_cache
11+
.ruff_cache

0 commit comments

Comments
 (0)