]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Update Dockerfile to Multi-Stage 1153/head
authormulti-stager <133181681+multi-stager@users.noreply.github.com>
Tue, 4 Feb 2025 02:11:48 +0000 (10:11 +0800)
committerGitHub <noreply@github.com>
Tue, 4 Feb 2025 02:11:48 +0000 (10:11 +0800)
Dockerfile

index 0440e56a88f9d22923435303c14995b88f4efcc8..55cc0841f8a09e85e81bb9bc35a869978815f1e9 100644 (file)
@@ -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