morningalarm/Dockerfile

24 lines
434 B
Docker
Raw Normal View History

2023-08-25 20:44:44 +00:00
FROM --platform=$BUILDPLATFORM golang:1.21-alpine as build
ADD . /app
WORKDIR /app
2023-08-27 13:11:28 +00:00
ARG TARGETARCH
ARG TARGETOS
2023-09-13 14:28:19 +00:00
RUN apk add --no-cache make
2023-08-25 20:44:44 +00:00
RUN make build BUILD_ARCH="$TARGETARCH" BUILD_OS="$TARGETOS"
FROM --platform=$TARGETPLATFORM alpine:latest
2023-09-13 14:28:19 +00:00
2023-08-25 20:44:44 +00:00
WORKDIR /data
2023-09-13 14:28:19 +00:00
RUN apk add --no-cache tzdata ca-certificates
2023-08-25 20:44:44 +00:00
COPY --from=build /app/build/morningalarm /app/morningalarm
EXPOSE 3000
VOLUME [ "/data" ]
CMD [ "/app/morningalarm" ]