feat: split build & runtime stages

This commit is contained in:
Bernat Vadell 2023-03-14 15:03:25 +01:00
parent ce509c79c5
commit 6d9ad1058b

View file

@ -1,6 +1,6 @@
ARG UBUNTU_VERSION=22.04 ARG UBUNTU_VERSION=22.04
FROM ubuntu:$UBUNTU_VERSION FROM ubuntu:$UBUNTU_VERSION as build
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y build-essential python3 python3-pip apt-get install -y build-essential python3 python3-pip
@ -14,4 +14,8 @@ COPY . .
RUN make RUN make
ENTRYPOINT [ "/app/main" ] FROM ubuntu:$UBUNTU_VERSION as runtime
COPY --from=build /app/main /main
ENTRYPOINT [ "/main" ]