Creating an OpenPrinting CUPS Docker Image
==========================================
+
Prerequisites
-------------
- Install Docker on your system
-Building and Running
---------------------
+Building
+--------
-To build and run CUPS using Docker, follow these steps:
+To build the CUPS Docker image, follow these steps:
1. Clone this repository to your local machine.
2. Navigate to the root directory of the cloned repository.
-3. Run the following command to start the Docker containers in the background:
+3. Run the following command to build the Docker image:
+
+ ```
+ docker build .
+ ```
+
+
+Running
+-------
+
+1. To create and run a container with the CUPS image:
```
docker-compose up -d
```
-4. To start interactive terminal in container
+2. To start an interactive terminal in the container
```
docker exec -it cups /bin/bash
avahi-daemon libavahi-client-dev \
libssl-dev libkrb5-dev libnss-mdns libpam-dev \
libsystemd-dev libusb-1.0-0-dev zlib1g-dev \
- sudo
+ 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 && make install
+RUN ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var && make clean && make && make install
# Expose port 631 for CUPS web interface
EXPOSE 631
# Grant sudo privileges to the user 'admin'
echo 'admin ALL=(ALL:ALL) ALL' >> /etc/sudoers
- # build CUPS
- ./configure
- make
- #make install
-
# Start the CUPS daemon for remote access
/usr/sbin/cupsd \
&& while [ ! -f /var/run/cups/cupsd.pid ]; do sleep 1; done \