Skip to content

Commit a524244

Browse files
committed
Add .devcontainer.json and Dockerfile
1 parent 820baac commit a524244

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.devcontainer.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "Flatten Tool Python Dev Container",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": "."
6+
},
7+
"customizations": {
8+
"vscode": {
9+
"extensions":["ms-python.python"]
10+
}
11+
},
12+
"remoteUser": "dev",
13+
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
14+
"workspaceFolder": "/workspace"
15+
}

Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM python:3.12
2+
3+
RUN addgroup --gid 2000 dev
4+
RUN adduser --uid 2000 --gid 2000 --gecos "" --disabled-password dev
5+
6+
USER dev:dev
7+
8+
COPY requirements_dev.txt /workspace/
9+
COPY setup.py /workspace/
10+
COPY flattentool /workspace/flattentool
11+
COPY flatten-tool /workspace/
12+
13+
WORKDIR /workspace
14+
15+
RUN pip3 install --user -r /workspace/requirements_dev.txt
16+
17+
RUN /bin/bash -c "echo \"export PATH=\$PATH:/home/dev/.local/bin/\" >> ~/.bashrc"
18+
19+
CMD ["bash"]

0 commit comments

Comments
 (0)