2021-11-22 12:03:33 +00:00
|
|
|
FROM golang:1-alpine as gobuild
|
2021-05-13 22:44:55 +00:00
|
|
|
|
|
|
|
RUN apk add --no-cache git
|
|
|
|
|
|
|
|
WORKDIR /go/src/srs.epita.fr/fic-server/
|
|
|
|
|
2023-05-12 12:34:51 +00:00
|
|
|
RUN apk add --no-cache binutils-gold build-base
|
2022-10-29 11:36:37 +00:00
|
|
|
|
2021-11-22 12:03:33 +00:00
|
|
|
COPY go.mod go.sum ./
|
|
|
|
COPY settings settings/
|
|
|
|
COPY libfic ./libfic/
|
|
|
|
COPY admin ./admin/
|
|
|
|
COPY repochecker ./repochecker/
|
2021-05-13 22:44:55 +00:00
|
|
|
|
2022-10-29 11:36:37 +00:00
|
|
|
RUN go get -d -v ./repochecker && \
|
2022-07-11 17:57:33 +00:00
|
|
|
go build -v -o repochecker/repochecker ./repochecker && \
|
2022-10-29 11:36:37 +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 14:03:30 +00:00
|
|
|
go build -v -buildmode=plugin -o repochecker/grammalecte-rules.so ./repochecker/grammalecte && \
|
2022-11-10 15:14:02 +00:00
|
|
|
go build -v -buildmode=plugin -o repochecker/pcap-inspector.so ./repochecker/pcap-inspector && \
|
2022-10-31 14:03:30 +00:00
|
|
|
go build -v -buildmode=plugin -o repochecker/videos-rules.so ./repochecker/videos
|
2022-10-29 11:36:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
ENV GRAMMALECTE_VERSION 2.1.1
|
2021-05-13 22:44:55 +00:00
|
|
|
|
2023-01-17 17:29:20 +00:00
|
|
|
ADD https://grammalecte.net/zip/Grammalecte-fr-v$GRAMMALECTE_VERSION.zip /srv/grammalecte.zip
|
2022-10-29 11:36:37 +00:00
|
|
|
|
|
|
|
RUN mkdir /srv/grammalecte && cd /srv/grammalecte && unzip /srv/grammalecte.zip && sed -i 's/if sys.version_info.major < (3, 7):/if False:/' /srv/grammalecte/grammalecte-server.py
|
2021-05-13 22:44:55 +00:00
|
|
|
|
2024-09-24 11:50:23 +00:00
|
|
|
FROM alpine:3.19
|
2021-05-13 22:44:55 +00:00
|
|
|
|
2022-11-10 15:14:02 +00:00
|
|
|
ENTRYPOINT ["/usr/bin/repochecker", "--rules-plugins=/usr/lib/epita-rules.so", "--rules-plugins=/usr/lib/file-inspector.so", "--rules-plugins=/usr/lib/grammalecte-rules.so", "--rules-plugins=/usr/lib/pcap-inspector.so", "--rules-plugins=/usr/lib/videos-rules.so"]
|
2021-11-13 16:27:32 +00:00
|
|
|
|
2022-10-31 14:03:30 +00:00
|
|
|
RUN apk add --no-cache git python3 ffmpeg
|
2021-05-13 22:44:55 +00:00
|
|
|
|
2022-10-29 11:36:37 +00:00
|
|
|
COPY --from=gobuild /srv/grammalecte /srv/grammalecte
|
2021-05-13 22:44:55 +00:00
|
|
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/repochecker /usr/bin/repochecker
|
2022-07-11 17:57:33 +00:00
|
|
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/epita-rules.so /usr/lib/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-29 11:36:37 +00:00
|
|
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/grammalecte-rules.so /usr/lib/grammalecte-rules.so
|
2022-11-10 15:14:02 +00:00
|
|
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/pcap-inspector.so /usr/lib/pcap-inspector.so
|
2022-10-31 14:03:30 +00:00
|
|
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/videos-rules.so /usr/lib/videos-rules.so
|