Skip to content

Commit 3b134a3

Browse files
Merge pull request #32 from Sonnet-Scripts/features/ss-04-dev-container
Added devcontainer config to run in GitHub codespaces or locally by attaching to docker desktop
2 parents 3c268f7 + 4ffebd1 commit 3b134a3

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

.devcontainer.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "Sonnet Scripts Dev Container",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "pythonbase",
5+
"initializeCommand": [
6+
"/bin/sh", "-c", "docker compose build linuxbase && docker compose build pythonbase"
7+
],
8+
"workspaceFolder": "/workspaces/sonnet-scripts",
9+
"mounts": [
10+
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
11+
],
12+
"features": {
13+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
14+
},
15+
"customizations": {
16+
"vscode": {
17+
"extensions": [
18+
"ms-python.python"
19+
]
20+
}
21+
}
22+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ docker-compose.override.yml
5151
.*
5252
!.gitignore
5353
!.github/
54+
!.devcontainer.json

linuxbase/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ COPY --from=builder /bin/bash /usr/local/bin/
3636

3737
# Install runtime dependencies if necessary
3838
RUN apt-get update && apt-get install -y --no-install-recommends \
39-
locales ca-certificates && \
39+
locales ca-certificates make git && \
4040
locale-gen en_US.UTF-8 && \
4141
rm -rf /var/lib/apt/lists/*
4242

0 commit comments

Comments
 (0)