Skip to content

Commit 27b511d

Browse files
committed
Add GitHub Codespaces config
Add GitHub Codespaces config following https://pixi.sh/latest/integration/editor/vscode/#devcontainer-extension allowing people to develop from anywhere. Waiting for #10888
1 parent eb01d9c commit 27b511d

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM mcr.microsoft.com/devcontainers/base:jammy
2+
3+
ARG PIXI_VERSION=v0.59.0
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+
# set some user and workdir settings to work nicely with vscode
10+
USER vscode
11+
WORKDIR /home/vscode
12+
13+
RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc

.devcontainer/devcontainer.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "my-workspace",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": ".."
6+
},
7+
"customizations": {
8+
"vscode": {
9+
"settings": {},
10+
"extensions": ["ms-python.python", "charliermarsh.ruff", "GitHub.copilot"]
11+
}
12+
},
13+
"features": {
14+
"ghcr.io/devcontainers/environments/docker-in-docker:2": {}
15+
},
16+
"mounts": [
17+
"source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume"
18+
],
19+
"postCreateCommand": "sudo chown vscode .pixi && pixi install"
20+
}

0 commit comments

Comments
 (0)