Skip to content

Commit 6ef7d41

Browse files
author
Vianpyro
committed
Add development container configuration with Dockerfile and VSCode settings
1 parent 7176476 commit 6ef7d41

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM alpine:latest
2+
3+
# Install common tools
4+
RUN apk add --no-cache bash git \
5+
python3 py3-pip
6+
7+
# Setup default user
8+
ARG USERNAME=vscode
9+
ARG USER_UID=1000
10+
ARG USER_GID=$USER_UID
11+
12+
RUN addgroup -g $USER_GID -S $USERNAME && \
13+
adduser -u $USER_UID -S -G $USERNAME -s /bin/bash $USERNAME
14+
15+
# Switch to the default user
16+
USER $USERNAME

.devcontainer/devcontainer.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "Smart Cooking API Development Container",
3+
"dockerFile": "Dockerfile",
4+
"customizations": {
5+
"settings": {
6+
"terminal.integrated.shell.linux": "/bin/bash"
7+
},
8+
"vscode": {
9+
"extensions": [
10+
"ms-python.black-formatter",
11+
"ms-python.python",
12+
"ms-python.isort"
13+
]
14+
}
15+
},
16+
"postStartCommand": "pip3 --disable-pip-version-check --no-cache-dir install -r requirements.txt --break-system-packages",
17+
"remoteUser": "vscode"
18+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

0 commit comments

Comments
 (0)