Skip to content

Commit be56a9f

Browse files
Merge pull request #1153 from multi-stager/patch-1
Update Dockerfile to Multi-Stage
2 parents 6a8ef7f + ed1b9ce commit be56a9f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# syntax=docker/dockerfile:1
22

3+
### Build stage
34
# Use the latest Ubuntu base image
4-
FROM ubuntu:latest
5+
FROM ubuntu:latest AS builder
56

67
# Set the working directory inside the container
78
WORKDIR /workspaces/cups
@@ -21,5 +22,9 @@ COPY . /root/cups
2122
WORKDIR /root/cups
2223
RUN ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var && make clean && make && make install
2324

25+
### Runtime stage
26+
FROM ubuntu:latest
27+
COPY --from=builder /root/cups /root/cups
28+
WORKDIR /root/cups
2429
# Expose port 631 for CUPS web interface
2530
EXPOSE 631

0 commit comments

Comments
 (0)