-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (43 loc) · 1.25 KB
/
Dockerfile
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
47
48
49
50
#
# build hodu
#
FROM rust:1.80.0-slim AS hodu-builder
WORKDIR /usr/src/hodu
COPY . .
RUN cargo build --release
#
# build isolate
#
FROM debian:12.6-slim AS isolate-builder
# install isolate
RUN apt-get update && apt-get --no-install-recommends install -y \
git build-essential pkg-config libcap-dev
RUN git config --global http.sslVerify false
RUN git clone --depth 1 --branch v1.10.1 https://github.com/ioi/isolate.git /usr/src/isolate
WORKDIR /usr/src/isolate
RUN make isolate
#
# runner
#
FROM debian:12.6-slim AS runner
# install language specific tools
RUN apt-get update && apt-get --no-install-recommends install -y \
# language: c
gcc libc6-dev \
# language: c++
g++ \
# language: java
openjdk-17-jdk \
# language: python
python3 \
# language: javascript
nodejs \
# clean
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# copy bin
COPY --from=hodu-builder /usr/src/hodu/target/release/hodu-server /usr/local/bin/hodu-server
COPY --from=isolate-builder /usr/src/isolate/isolate /usr/local/bin/isolate
COPY --from=isolate-builder /usr/src/isolate/isolate-check-environment /usr/local/bin/isolate-check-environment
COPY --from=isolate-builder /usr/src/isolate/default.cf /usr/local/etc/isolate
ENTRYPOINT ["/usr/local/bin/hodu-server"]