2024-10-27 15:11:14 +00:00
|
|
|
FROM --platform=$TARGETPLATFORM golang:1.21 AS builder
|
2023-10-14 16:06:02 +00:00
|
|
|
ARG TARGETPLATFORM
|
|
|
|
ARG BUILDPLATFORM
|
|
|
|
WORKDIR /go/src/git.faercol.me/polyculeconnect
|
|
|
|
COPY polyculeconnect ./
|
2023-10-22 11:22:54 +00:00
|
|
|
RUN make build
|
2023-10-14 16:06:02 +00:00
|
|
|
|
|
|
|
# Replace with from scratch later on
|
2023-10-28 13:18:01 +00:00
|
|
|
FROM --platform=$TARGETPLATFORM debian:latest
|
|
|
|
RUN apt-get update && \
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get -qq install ca-certificates
|
2023-10-14 16:06:02 +00:00
|
|
|
WORKDIR /root
|
|
|
|
COPY --from=builder go/src/git.faercol.me/polyculeconnect/build/polyculeconnect ./
|
2023-10-19 16:33:46 +00:00
|
|
|
ADD polyculeconnect/robots.txt /root/
|
|
|
|
ADD polyculeconnect/static /root/static/
|
|
|
|
ADD polyculeconnect/templates /root/templates/
|
2023-10-14 16:06:02 +00:00
|
|
|
|
|
|
|
VOLUME [ "/config" ]
|
|
|
|
|
|
|
|
ENTRYPOINT [ "./polyculeconnect" ]
|
2023-10-28 13:18:01 +00:00
|
|
|
CMD [ "serve", "--config", "/config/config.json" ]
|