multi stages build

Signed-off-by: Léo Haf <leohaf@orangepill.ovh>
This commit is contained in:
Léo Haf 2024-10-16 18:46:28 +02:00
parent 26b42afdfb
commit 36a8e209bc
Signed by: Retropex
GPG Key ID: 0E37EBAB8574F005

View File

@ -1,4 +1,4 @@
FROM debian:bookworm-slim
FROM debian:bookworm-slim AS build
RUN apt update
@ -10,6 +10,18 @@ COPY datum_gateway /app/
RUN cmake . && make
FROM debian:bookworm-slim AS base
RUN apt update
RUN apt install libmicrohttpd12 libjansson4 libsodium23 curl -y
WORKDIR /app
COPY --from=build /app/datum_gateway /app
LABEL org.opencontainers.image.source https://github.com/retropex/datum-docker
LABEL org.opencontainers.image.description Datum in a container
CMD ["./datum_gateway", "-c datum-setting.json"]