-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (39 loc) · 1.34 KB
/
Dockerfile
File metadata and controls
46 lines (39 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM ubuntu:24.04
MAINTAINER Baoshuo <i@baoshuo.ren>
LABEL org.opencontainers.image.source="https://github.com/UniversalOJ/UOJ-System"
LABEL org.opencontainers.image.description="UOJ Judger"
LABEL org.opencontainers.image.licenses="MIT"
ARG CLONE_ADDFLAG
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
ENV TZ=Asia/Shanghai
RUN \
apt-get update && \
apt-get install -y --no-install-recommends \
git vim ntp zip unzip curl wget make dpkg-dev ca-certificates \
fp-compiler \
python3 python3-requests \
openjdk-21-jdk-headless \
gcc-14 g++-14 \
libseccomp-dev \
tzdata && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 && \
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-14 100 && \
cd /usr/src && \
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz && \
tar xzf Python-2.7.18.tgz && \
cd Python-2.7.18 && \
./configure && \
make -j"$(nproc)" && \
make install && \
cd / && \
rm -rf /usr/src/Python-2.7.18.tgz /usr/src/Python-2.7.18 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ADD . /opt/uoj_judger
WORKDIR /opt/uoj_judger
# Install environment and set startup script
RUN sh install.sh -p && sh install.sh -d
EXPOSE 2333
CMD ["/opt/up"]