mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
install: update Dockerfile and compose file (#999)
This commit is contained in:
1 parent
8ed74053d5
commit
a49ff686e1
8 files changed
+104
-52
No files matched your search
@@ -1,28 +1,29 @@
|
||||
FROM node:20
|
||||
|
||||
COPY ./entrypoint.sh /root/entrypoint.sh
|
||||
|
||||
RUN apt-get -qq update && \
|
||||
apt-get install -y \
|
||||
gcc \
|
||||
python3 \
|
||||
g++ \
|
||||
fp-compiler \
|
||||
openjdk-8-jdk-headless \
|
||||
python \
|
||||
php7.0-cli \
|
||||
openjdk-17-jdk-headless \
|
||||
php-cli \
|
||||
rustc \
|
||||
haskell-platform \
|
||||
ghc \
|
||||
libjavascriptcoregtk-4.0-bin \
|
||||
golang \
|
||||
ruby \
|
||||
mono-runtime \
|
||||
mono-mcs
|
||||
|
||||
ADD ./entrypoint.sh /root/entrypoint.sh
|
||||
ADD ./judge.yaml /root/judge.yaml
|
||||
RUN chmod +x /root/entrypoint.sh
|
||||
mono-mcs && \
|
||||
chmod +x /root/entrypoint.sh && \
|
||||
# node is at /usr/local/bin but hydrojudge will find it at /usr/bin
|
||||
# so make a symlink to it
|
||||
ln -s /usr/local/bin/node /usr/bin/node
|
||||
|
||||
RUN yarn global add pm2 @hydrooj/hydrojudge && \
|
||||
wget https://github.com/criyle/go-judge/releases/download/v1.8.0/go-judge_1.8.0_linux_amd64 -O /usr/bin/sandbox && \
|
||||
wget https://github.com/criyle/go-judge/releases/download/v1.9.4/go-judge_1.9.4_linux_amd64v3 -O /usr/bin/sandbox && \
|
||||
chmod +x /usr/bin/sandbox
|
||||
|
||||
ENTRYPOINT /root/entrypoint.sh
|
||||
ENTRYPOINT ["/root/entrypoint.sh"]
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
pm2 start sandbox
|
||||
pm2 start sandbox -- -mount-conf /root/.hydro/mount.yaml
|
||||
pm2-runtime start hydrojudge
|
||||
@@ -2,6 +2,6 @@ hosts:
|
||||
localhost:
|
||||
type: hydro
|
||||
server_url: http://oj-backend:8888/
|
||||
uname: root
|
||||
password: rootroot
|
||||
detail: true
|
||||
uname: judge
|
||||
password: examplepassword
|
||||
detail: full
|
||||
@@ -0,0 +1,46 @@
|
||||
mount:
|
||||
- type: bind
|
||||
source: /bin
|
||||
target: /bin
|
||||
readonly: true
|
||||
- type: bind
|
||||
source: /lib
|
||||
target: /lib
|
||||
readonly: true
|
||||
- type: bind
|
||||
source: /lib64
|
||||
target: /lib64
|
||||
readonly: true
|
||||
- type: bind
|
||||
source: /usr
|
||||
target: /usr
|
||||
readonly: true
|
||||
- type: bind
|
||||
source: /etc
|
||||
target: /etc
|
||||
readonly: true
|
||||
- type: bind
|
||||
source: /var
|
||||
target: /var
|
||||
readonly: true
|
||||
- type: bind
|
||||
source: /dev/null
|
||||
target: /dev/null
|
||||
- type: bind
|
||||
source: /dev/urandom
|
||||
target: /dev/urandom
|
||||
- type: bind
|
||||
source: /dev/zero
|
||||
target: /dev/zero
|
||||
- type: tmpfs
|
||||
target: /w
|
||||
data: size=512m,nr_inodes=8k
|
||||
- type: tmpfs
|
||||
target: /tmp
|
||||
data: size=512m,nr_inodes=8k
|
||||
proc: true
|
||||
workDir: /w
|
||||
hostName: executor_server
|
||||
domainName: executor_server
|
||||
uid: 1536
|
||||
gid: 1536
|
||||
Reference in new issue
Block a user