feat: split build & runtime stages
This commit is contained in:
parent
ce509c79c5
commit
6d9ad1058b
1 changed files with 6 additions and 2 deletions
|
@ -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" ]
|
Loading…
Add table
Add a link
Reference in a new issue