Skip to content

Commit

Permalink
feat: Dockerfile for gcc-only
Browse files Browse the repository at this point in the history
  • Loading branch information
minhnhatnoe committed Apr 29, 2024
1 parent 4871ddf commit d4015c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
18 changes: 1 addition & 17 deletions docker/gcc-only.dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit d4015c4

Please sign in to comment.