From: Michael R Sweet Date: Tue, 17 Sep 2024 23:09:44 +0000 (-0400) Subject: Fix docker builds/compose (Issue #1021) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dd0c14be9024942f06957d558c228cda80a1b5e;p=thirdparty%2Fcups.git Fix docker builds/compose (Issue #1021) --- diff --git a/DOCKER.md b/DOCKER.md index fce831d20f..d967052c6f 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -1,28 +1,39 @@ 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 diff --git a/Dockerfile b/Dockerfile index 93d37e1428..0440e56a88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,12 +14,12 @@ 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 \ - 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 diff --git a/docker-compose.yaml b/docker-compose.yaml index e6edc386b0..bb604846dc 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -21,11 +21,6 @@ services: # 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 \