server/Dockerfile-admin

43 lines
1.4 KiB
Plaintext
Raw Normal View History

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/
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 && \
go build -v -buildmode=plugin -o repochecker/epita-rules.so ./repochecker/epita && \
go build -v -buildmode=plugin -o repochecker/file-inspector.so ./repochecker/file-inspector && \
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
FROM alpine:3.20
2018-05-10 19:12:51 +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
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/file-inspector.so /usr/lib/file-inspector.so
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/grammalecte-rules.so /usr/lib/grammalecte-rules.so
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/videos-rules.so /usr/lib/videos-rules.so