2021-11-22 12:03:33 +00:00
|
|
|
FROM golang:1-alpine as gobuild
|
2018-05-10 19:12:51 +00:00
|
|
|
|
|
|
|
RUN apk add --no-cache git
|
|
|
|
|
2021-05-13 21:47:18 +00:00
|
|
|
WORKDIR /go/src/srs.epita.fr/fic-server/
|
2021-02-28 17:28:05 +00:00
|
|
|
|
2023-05-12 12:34:51 +00:00
|
|
|
RUN apk add --no-cache binutils-gold build-base
|
|
|
|
|
2021-11-22 12:03:33 +00:00
|
|
|
COPY go.mod go.sum ./
|
|
|
|
COPY settings settings/
|
|
|
|
COPY libfic ./libfic/
|
|
|
|
COPY admin ./admin/
|
2022-07-11 17:57:33 +00:00
|
|
|
COPY repochecker ./repochecker/
|
2018-05-10 19:12:51 +00:00
|
|
|
|
2023-05-12 12:34:51 +00:00
|
|
|
RUN go get -d -v ./admin && \
|
2023-05-05 13:54:29 +00:00
|
|
|
go build -v -o admin/admin ./admin && \
|
2022-10-30 18:46:45 +00:00
|
|
|
go build -v -buildmode=plugin -o repochecker/epita-rules.so ./repochecker/epita && \
|
2022-11-03 01:32:27 +00:00
|
|
|
go build -v -buildmode=plugin -o repochecker/file-inspector.so ./repochecker/file-inspector && \
|
2022-10-31 16:00:37 +00:00
|
|
|
go build -v -buildmode=plugin -o repochecker/grammalecte-rules.so ./repochecker/grammalecte && \
|
|
|
|
go build -v -buildmode=plugin -o repochecker/videos-rules.so ./repochecker/videos
|
2018-05-10 19:12:51 +00:00
|
|
|
|
|
|
|
|
2024-05-24 09:21:13 +00:00
|
|
|
FROM alpine:3.20
|
2018-05-10 19:12:51 +00:00
|
|
|
|
2021-11-14 00:16:53 +00:00
|
|
|
RUN apk add --no-cache \
|
|
|
|
ca-certificates \
|
|
|
|
git \
|
|
|
|
git-lfs \
|
|
|
|
openssh-client-default \
|
|
|
|
openssl
|
2018-05-10 19:12:51 +00:00
|
|
|
|
|
|
|
EXPOSE 8081
|
|
|
|
|
|
|
|
WORKDIR /srv
|
|
|
|
|
|
|
|
ENTRYPOINT ["/srv/admin", "-bind=:8081", "-baseurl=/admin/"]
|
|
|
|
|
|
|
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/admin/admin /srv/admin
|
2022-07-11 17:57:33 +00:00
|
|
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/epita-rules.so /srv/epita-rules.so
|
2022-11-03 01:32:27 +00:00
|
|
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/file-inspector.so /usr/lib/file-inspector.so
|
2022-10-30 18:46:45 +00:00
|
|
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/grammalecte-rules.so /usr/lib/grammalecte-rules.so
|
2022-10-31 16:00:37 +00:00
|
|
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/videos-rules.so /usr/lib/videos-rules.so
|