forked from cranemont/Iris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-dev
executable file
·41 lines (34 loc) · 1.22 KB
/
Dockerfile-dev
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
FROM ubuntu:20.04
COPY sources.list /etc/apt/
ENV TZ=Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
WORKDIR /app
RUN buildDeps='software-properties-common curl' \
&& apt-get update && apt-get install -y $buildDeps \
&& add-apt-repository ppa:deadsnakes/ppa \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash -E - \
&& apt-get update && apt-get install -y \
gcc \
g++ \
nodejs \
python3.10 \
pypy3 \
openjdk-17-jdk \
&& apt-get purge -y --auto-remove $buildDeps \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN mkdir -p sandbox/policy \
&& mkdir sandbox/results\
&& mkdir -p sandbox/logs/run \
&& mkdir -p sandbox/logs/compile
COPY lib/judger/policy/java_policy sandbox/policy/
COPY lib/judger/libjudger.so ./sandbox/
# install essential packages and go for development
RUN apt-get update && apt-get install -y wget vim git
RUN wget -P /tmp https://go.dev/dl/go1.20.linux-amd64.tar.gz && \
tar -C /usr/local -xzf /tmp/go1.20.linux-amd64.tar.gz && \
rm /tmp/go1.20.linux-amd64.tar.gz
ENV GOPATH /app
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH/src
ENV APP_ENV=development