cups icon indicating copy to clipboard operation
cups copied to clipboard

Unable to run cups in docker container

Open 87n-apps opened this issue 9 months ago • 2 comments

Before you write the report Read the REPORTING_ISSUES.md file in the main repository and prepare data mentioned there which looks relevant to you issue.

Describe the bug After cloning cups repo docker container fails to run successfully. With missing packages and unable to find cupsd.

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/OpenPrinting/cups.git
  2. cd cups
  3. docker build .
  4. docker compose up -d docker_compose_up.txt
  5. See container is not running docker ps -a
  6. Roll back changes from #1153
  7. docker rm cups; docker image rm cups-cups
  8. docker build .
  9. docker compose up
  10. Container exits with /usr/sbin/cupsd: error while loading shared libraries: libcups.so.2: cannot open shared object file: No such file or directory

Expected behavior A docker container that has cups running when docker compose up is run.

Screenshots

System Information:

  • OS and its version: Linux Mint 22.1
  • Application: Docker
  • CUPS version: CUPS 2.5b1

Additional context Recent merged pull request #1153 actually fails to copy relevant files to runtime stage causing error listed in step 4 in reproducing behavior.

87n-apps avatar May 23 '25 00:05 87n-apps

I am seeing the same issue on Ubuntu 24.04.

As you said, this appears to be caused by the changes to the Dockerfile in #1153 not copying all the relevant files, as well as the need to separate the build dependencies from the runtime dependencies (e.g. openssl needs to be apt-get installed in the runtime).

WCEngineer avatar Jun 16 '25 11:06 WCEngineer

@87n-apps There are ways to fix step 10 error.discussions#1012

I modify the Dockerfile and successfully built docker image from the source code. Build docker image for cups-2.4.12-amd64 from source.

y824165978 avatar Jun 20 '25 15:06 y824165978