-
Notifications
You must be signed in to change notification settings - Fork 235
/
Copy pathDockerfile
30 lines (24 loc) · 920 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# syntax=docker/dockerfile:1
### Build stage
# Use the latest Ubuntu base image
FROM ubuntu:latest AS builder
# Set the working directory inside the container
WORKDIR /workspaces/cups
# Update package list and upgrade existing packages
RUN apt-get update -y && apt-get upgrade --fix-missing -y
# Install required dependencies for CUPS
RUN apt-get install -y autoconf build-essential \
avahi-daemon libavahi-client-dev \
libssl-dev libkrb5-dev libnss-mdns libpam-dev \
libsystemd-dev libusb-1.0-0-dev zlib1g-dev \
openssl sudo
# Copy the current directory contents into the container's working directory
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