diff --git a/docker/Dockerfile b/docker/Dockerfile index ab1c816..ce08d2c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -38,7 +38,7 @@ RUN scripts/install_tools.sh RUN go generate && go build -tags production -o kjudge cmd/kjudge/main.go # Stage 3: Create awesome output image -FROM ghcr.io/minhnhatnoe/isolate:latest +FROM ghcr.io/minhnhatnoe/isolate:v2.1.2 RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ diff --git a/docker/gcc-only.dockerfile b/docker/gcc-only.dockerfile index 3071e1f..c065888 100644 --- a/docker/gcc-only.dockerfile +++ b/docker/gcc-only.dockerfile @@ -1,14 +1,3 @@ -# Stage 0: Compile isolate -FROM alpine:3 AS isolate - -RUN apk add --no-cache libcap gcc make git g++ libcap-dev - -WORKDIR /isolate - -RUN git clone --branch v1.10.1 --single-branch https://github.com/ioi/isolate.git . - -RUN make isolate - # Stage 1: Generate front-end FROM node:18-alpine AS frontend @@ -40,15 +29,10 @@ RUN sh scripts/install_tools.sh RUN go generate && go build -tags production -o kjudge cmd/kjudge/main.go # Stage 3: Create awesome output image -FROM alpine:3 +FROM ghcr.io/minhnhatnoe/isolate:v2.1.2-alpine RUN apk add --no-cache libcap make g++ openssl bash -COPY --from=isolate /isolate/ /isolate - -WORKDIR /isolate -RUN make install - COPY --from=backend /kjudge/kjudge /usr/local/bin COPY --from=backend /kjudge/scripts /scripts