Skip to content

Commit

Permalink
Merge pull request #93 from dkj/devcontainer
Browse files Browse the repository at this point in the history
Initial devcontainer config
  • Loading branch information
kjsanger authored Jan 29, 2025
2 parents 2f960be + 509fe1c commit 3f01991
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "ubuntu-dood-go-sqyrrl",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
//"image": "mcr.microsoft.com/devcontainers/base:jammy",
"dockerComposeFile": "docker-compose.devcontainer.yaml",
"service": "devcontainer",
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": true,
"installDockerBuildx": true,
"installDockerComposeSwitch": true,
"version": "latest",
"dockerDashComposeVersion": "v2"
},
"ghcr.io/devcontainers/features/go:1": {
"version": "1.23"
}
},
"workspaceFolder": "/workspaces",
"postCreateCommand": "sudo chown -R vscode:vscode /workspaces/volume && ( [ -d /workspaces/volume/sqyrrl ] || git clone https://github.com/wtsi-npg/sqyrrl.git /workspaces/volume/sqyrrl ) && cd /workspaces/volume/sqyrrl && make test"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
29 changes: 29 additions & 0 deletions .devcontainer/docker-compose.devcontainer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

services:
devcontainer:
image: "mcr.microsoft.com/devcontainers/base:jammy"
#image: "mcr.microsoft.com/devcontainers/go:dev-1.23-bookworm"
volumes:
- ..:/workspaces/host/sqyrrl:ro,cached
# above has all the normal pain of mismatched user:group ids
- sqyrrldev:/workspaces/volume:rw
network_mode: service:irodsserver
command: sleep infinity

irodsserver:
#container_name: irods-server
image: "ghcr.io/wtsi-npg/ub-16.04-irods-4.2.7:latest"
platform: linux/amd64
ports:
- "127.0.0.1:1247:1247"
- "127.0.0.1:20000-20199:20000-20199"
restart: always
healthcheck:
test: ["CMD", "nc", "-z", "-v", "127.0.0.1", "1247"]
start_period: 30s
interval: 5s
timeout: 10s
retries: 12

volumes:
sqyrrldev:

0 comments on commit 3f01991

Please sign in to comment.