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
|
|
|
|
2021-11-22 12:03:33 +00:00
|
|
|
COPY go.mod go.sum ./
|
|
|
|
COPY settings settings/
|
|
|
|
COPY libfic ./libfic/
|
2023-07-09 18:40:53 +00:00
|
|
|
COPY receiver ./receiver/
|
2018-05-10 19:12:51 +00:00
|
|
|
|
2023-07-09 18:40:53 +00:00
|
|
|
RUN go get -d -v ./receiver && \
|
|
|
|
go build -v -buildvcs=false -o ./receiver/receiver ./receiver
|
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
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
WORKDIR /srv
|
|
|
|
|
2021-06-08 23:46:09 +00:00
|
|
|
ENTRYPOINT ["/usr/sbin/entrypoint.sh"]
|
|
|
|
CMD ["--bind=:8080"]
|
|
|
|
|
2023-07-09 18:40:53 +00:00
|
|
|
COPY entrypoint-receiver.sh /usr/sbin/entrypoint.sh
|
2018-05-10 19:12:51 +00:00
|
|
|
|
2023-07-09 18:40:53 +00:00
|
|
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/receiver/receiver /srv/receiver
|