Skip to content

Commit 25ec26a

Browse files
committed
Create devcontainer and fix build
The container doesn't contain all dependencies yet, but runs the first problems!
1 parent bc6d96a commit 25ec26a

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
3+
{
4+
"name": "Compretitive Programming",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye",
7+
// Full list: https://containers.dev/features
8+
"features": {
9+
"ghcr.io/devcontainers/features/git:1": {},
10+
"ghcr.io/jungaretti/features/make:1": {},
11+
"ghcr.io/devcontainers/features/java:1": {},
12+
"ghcr.io/devcontainers-extra/features/kotlin-sdkman:2": {},
13+
"ghcr.io/devcontainers/features/python:1": {}
14+
},
15+
16+
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
17+
// "mounts": [
18+
// {
19+
// "source": "devcontainer-cargo-cache-${devcontainerId}",
20+
// "target": "/usr/local/cargo",
21+
// "type": "volume"
22+
// }
23+
// ]
24+
25+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
26+
// "forwardPorts": [],
27+
28+
// Use 'postCreateCommand' to run commands after the container is created.
29+
"postCreateCommand": {
30+
"rust version": "rustc --version",
31+
"link rust": "sudo ln -s /usr/local/cargo/bin/rustc /usr/bin/rustc",
32+
"problemtools": "sudo apt-get update && sudo apt-get install -y libboost-all-dev && pip install git+https://github.com/kattis/problemtools@master"
33+
}
34+
35+
// Configure tool-specific properties.
36+
// "customizations": {},
37+
38+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
39+
// "remoteUser": "root"
40+
}

problems/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ all: $(PROBLEMS)
55
.PHONY: all $(PROBLEMS)
66

77
$(PROBLEMS):
8-
verifyproblem -p config submissions $@
8+
verifyproblem -p config submissions -- $@

0 commit comments

Comments
 (0)