Unable to run cups in docker container
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:
-
git clone https://github.com/OpenPrinting/cups.git -
cd cups -
docker build . -
docker compose up -ddocker_compose_up.txt - See container is not running
docker ps -a - Roll back changes from #1153
-
docker rm cups; docker image rm cups-cups -
docker build . -
docker compose up - 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.
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).
@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.