polycule-connect/Dockerfile
Melora Hugues d8023a527e
All checks were successful
/ go-test (push) Successful in 1m15s
/ docker-build-only (push) Successful in 1m36s
Fix unit tests and docker build
2024-10-27 16:11:14 +01:00

21 lines
689 B
Docker

FROM --platform=$TARGETPLATFORM golang:1.21 AS builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
WORKDIR /go/src/git.faercol.me/polyculeconnect
COPY polyculeconnect ./
RUN make build
# Replace with from scratch later on
FROM --platform=$TARGETPLATFORM debian:latest
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -qq install ca-certificates
WORKDIR /root
COPY --from=builder go/src/git.faercol.me/polyculeconnect/build/polyculeconnect ./
ADD polyculeconnect/robots.txt /root/
ADD polyculeconnect/static /root/static/
ADD polyculeconnect/templates /root/templates/
VOLUME [ "/config" ]
ENTRYPOINT [ "./polyculeconnect" ]
CMD [ "serve", "--config", "/config/config.json" ]