From: multi-stager <133181681+multi-stager@users.noreply.github.com> Date: Tue, 4 Feb 2025 02:11:48 +0000 (+0800) Subject: Update Dockerfile to Multi-Stage X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed1b9ce3043e3def3f1156b15117da2e410bde5e;p=thirdparty%2Fcups.git Update Dockerfile to Multi-Stage --- diff --git a/Dockerfile b/Dockerfile index 0440e56a88..55cc0841f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ # syntax=docker/dockerfile:1 +### Build stage # Use the latest Ubuntu base image -FROM ubuntu:latest +FROM ubuntu:latest AS builder # Set the working directory inside the container WORKDIR /workspaces/cups @@ -21,5 +22,9 @@ COPY . /root/cups WORKDIR /root/cups RUN ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var && make clean && make && make install +### Runtime stage +FROM ubuntu:latest +COPY --from=builder /root/cups /root/cups +WORKDIR /root/cups # Expose port 631 for CUPS web interface EXPOSE 631