Skip to content

Commit 69cf28b

Browse files
committed
add devcontainer
1 parent 38411da commit 69cf28b

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
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/base:jammy
2+
3+
ARG PIXI_VERSION=v0.42.1
4+
5+
RUN curl -L -o /usr/local/bin/pixi -fsSL --compressed "https://github.com/prefix-dev/pixi/releases/download/${PIXI_VERSION}/pixi-$(uname -m)-unknown-linux-musl" \
6+
&& chmod +x /usr/local/bin/pixi \
7+
&& pixi info
8+
9+
USER vscode
10+
WORKDIR /home/vscode
11+
12+
RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc

.devcontainer/devcontainer.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "URGENT Risk Management Toolbox",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": ".."
6+
},
7+
"features": {
8+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
9+
},
10+
"remoteUser": "vscode",
11+
"customizations": {
12+
"vscode": {
13+
"extensions": [
14+
"ms-python.python",
15+
"ms-python.vscode-pylance",
16+
"charliermarsh.ruff"
17+
],
18+
"settings": {
19+
"python.terminal.activateEnvironment": true,
20+
"terminal.integrated.defaultProfile.linux": "bash"
21+
}
22+
}
23+
},
24+
"mounts": ["source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume"],
25+
"postCreateCommand": "sudo chown -R vscode .pixi && pixi install"
26+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,3 +459,6 @@ orchestration_files/
459459
.pixi/*
460460
!.pixi/config.toml
461461
pixi.lock
462+
463+
# devcontainer dev files
464+
.vscode/

0 commit comments

Comments
 (0)