Skip to content

Commit

Permalink
devcontainer added
Browse files Browse the repository at this point in the history
  • Loading branch information
nelson-lojo committed May 27, 2024
1 parent 40a9628 commit 6cce4aa
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/universal
{
"name": "Launch Course",

"dockerComposeFile": [ "docker-compose.yml" ],
"service" : "devcontainer",
"workspaceFolder": "/workspaces/pl-ucb-csxxx",

"forwardPorts": [ 3000 ],

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
},

"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
}
22 changes: 22 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:
prairielearn:
image: prairielearn/prairielearn:latest
platform: linux/amd64
environment:
HOST_JOBS_DIR: /tmp/directory/for/autograder/jobqueue
ports:
- 3000:3000
volumes:
- /tmp/directory/for/autograder/jobqueue:/jobs
- .:/course
- /var/run/docker.sock:/var/run/docker.sock
extra_hosts:
- "host.docker.internal:host-gateway"

devcontainer:
image: mcr.microsoft.com/devcontainers/universal
platform: linux/amd64
links:
- prairielearn
volumes: # Mount the root folder that contains .git
- ..:/workspaces/pl-ucb-csxxx:rw

0 comments on commit 6cce4aa

Please sign in to comment.