2023-08-11 18:54:00 +08:00
|
|
|
FROM docker.io/library/ubuntu:22.04
|
2024-01-04 18:12:00 +08:00
|
|
|
WORKDIR /woj
|
2023-08-11 18:54:00 +08:00
|
|
|
|
2024-01-27 21:59:38 +08:00
|
|
|
# Install dependencies & languages
|
|
|
|
RUN apt-get update && apt-get upgrade -y && apt-get install -y software-properties-common \
|
|
|
|
&& add-apt-repository ppa:pypy/ppa && apt-get update \
|
|
|
|
&& apt-get install -y \
|
|
|
|
git parallel wget curl \
|
|
|
|
gcc g++ clang make cmake autoconf m4 libtool gperf \
|
|
|
|
python3 pypy3 \
|
|
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists
|
|
|
|
RUN wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz && rm go1.21.6.linux-amd64.tar.gz
|
|
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
|
|
ENV PATH=/usr/local/go/bin:/root/.cargo/bin:$PATH
|
2023-08-11 18:54:00 +08:00
|
|
|
|
|
|
|
# Copy source code
|
|
|
|
RUN mkdir -p /woj/framework && mkdir -p /woj/problem
|
|
|
|
COPY framework /woj/framework
|
|
|
|
|
|
|
|
# Build
|
|
|
|
RUN cd /woj/framework/template && ./setup.sh
|
|
|
|
RUN cd /woj/framework/scripts && ./setup.sh
|
|
|
|
|
|
|
|
# Environment
|
|
|
|
ENV WOJ_LAUNCHER=/woj/framework/scripts/woj_launcher
|
|
|
|
ENV WOJ_SANDBOX=/woj/framework/scripts/libwoj_sandbox.so
|
|
|
|
ENV TEMPLATE=/woj/framework/template
|
|
|
|
ENV TESTLIB=/woj/framework/template/testlib
|
2024-01-06 19:22:32 +08:00
|
|
|
ENV PREFIX=/woj
|
2024-01-01 21:56:26 +08:00
|
|
|
|