Skip to content

Commit d55c6da

Browse files
committed
Add NOROOTFS version of Dockerfile
1 parent d781c18 commit d55c6da

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/lib
44
/.git
55
/Dockerfile
6+
/Dockerfile.NOROOTFS

Dockerfile.NOROOTFS

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM node:10-buster
2+
3+
# Install OS dependencies
4+
RUN apt-get update && \
5+
apt-get install -y python3 build-essential libboost-all-dev
6+
7+
WORKDIR /app
8+
9+
# Install NPM dependencies
10+
COPY package.json yarn.lock ./
11+
RUN yarn --frozen-lockfile
12+
13+
# Copy code and build
14+
COPY . .
15+
RUN yarn build
16+
17+
ENV NODE_ENV=production \
18+
SYZOJ_JUDGE_RUNNER_INSTANCE=runner \
19+
SYZOJ_JUDGE_SANDBOX_ROOTFS_PATH=/rootfs \
20+
SYZOJ_JUDGE_WORKING_DIRECTORY=/tmp/working \
21+
SYZOJ_JUDGE_BINARY_DIRECTORY=/tmp/binary \
22+
SYZOJ_JUDGE_TESTDATA_PATH=/app/testdata \
23+
SYZOJ_JUDGE_DO_NOT_USE_X32_ABI=true
24+
25+
VOLUME ["/app/config", "/app/testdata", "/rootfs"]
26+
27+
COPY ./docker-entrypoint.sh /
28+
ENTRYPOINT ["/docker-entrypoint.sh"]
29+
CMD ["daemon"]

0 commit comments

Comments
 (0)