Skip to content

Commit 49cdb4a

Browse files
committed
devcontainer: bump node version to 22 and update feature installation
1 parent 4165e9b commit 49cdb4a

3 files changed

Lines changed: 22 additions & 12 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:20-bookworm
2-
ADD https://github.com/criyle/go-judge/releases/download/v1.8.0/go-judge_1.8.0_linux_amd64 /usr/bin/sandbox
3-
RUN npm install -g yarn && \
4-
sudo apt-get update && sudo apt-get install gcc g++ && \
5-
mkdir -p /root/.hydro /data/file && chmod +x /usr/bin/sandbox && \
1+
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:22-bookworm
2+
3+
RUN mkdir -p /root/.hydro /data/file && \
64
chown -R root:root /root /root/.hydro /data/file && \
75
echo '{"uri":"mongodb://mongo/hydro"}' > /root/.hydro/config.json && \
86
echo '["@hydrooj/ui-default","@hydrooj/hydrojudge"]' > /root/.hydro/addon.json
9-
ENTRYPOINT sandbox

.devcontainer/devcontainer.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"dbaeumer.vscode-eslint",
1010
"gruntfuggly.todo-tree",
1111
"ronnidc.nunjucks",
12-
"eamodio.gitlens",
13-
"vscode-icons-team.vscode-icons",
1412
"sysoev.language-stylus"
1513
]
1614
}
@@ -20,5 +18,19 @@
2018
2333,
2119
8000
2220
],
21+
"features": {
22+
"ghcr.io/devcontainers-extra/features/gh-release:1": {
23+
"repo": "criyle/go-judge",
24+
"binaryNames": "go-judge",
25+
"assetRegex": "go-judge_.*\\.tar\\.gz"
26+
},
27+
"ghcr.io/devcontainers-extra/features/apt-packages:1": {
28+
"packages": [
29+
"gcc",
30+
"g++"
31+
]
32+
},
33+
"ghcr.io/devcontainers/features/node:1": {}
34+
},
2335
"postCreateCommand": "git submodule update --init && yarn install && npx hydrooj cli system set server.port 2333 && npx hydrooj cli user create root@hydro.local root rootroot 2 && npx hydrooj cli user setSuperAdmin 2"
24-
}
36+
}

.devcontainer/docker-compose.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
version: '3.9'
2-
31
services:
42
mongo:
5-
image: mongo:4-focal
3+
image: mongo:latest
64
restart: unless-stopped
75
volumes:
86
- mongodb-data:/data/db
@@ -15,8 +13,11 @@ services:
1513
- mongo
1614
volumes:
1715
- ..:/workspace:cached
16+
- node_modules:/workspace/node_modules
1817
- testdata:/data/file
18+
command: go-judge
1919

2020
volumes:
2121
mongodb-data:
22+
node_modules:
2223
testdata:

0 commit comments

Comments
 (0)