File README of Package cups-container
Single-purpose CUPS container using Dockerfile
as a preliminary test version of a CUPS container for ALP
with its OBS build sources in
https://build.opensuse.org/package/show/home:jsmeix:branches:openSUSE:Templates:Images:Tumbleweed/cups-container
that are derived from the "Application Container using Dockerfile"
at https://build.opensuse.org/image_templates which links to
https://build.opensuse.org/package/show/openSUSE:Templates:Images:Tumbleweed/dockerfile-application-container
In ALP (run the commands as 'root' unless otherwise noted):
Get the latest CUPS container image e.g. via:
# podman pull registry.opensuse.org/home/jsmeix/branches/opensuse/templates/images/tumbleweed/containers/suse/alp/workloads/cups:latest
List what you got:
# podman image list -a
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.opensuse.org/.../containers/suse/alp/workloads/cups latest 7a1a770bf589 ... 197 MB
Run it e.g. via
(replace 7a1a770bf589 with the IMAGE ID shown by 'podman image list -a'):
# podman run -p 631:631/tcp --detach --interactive --tty 7a1a770bf589
List what is running:
# podman container list -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9ae141335b1a registry.opensuse.org/.../containers/suse/alp/workloads/cups:latest -F ... Up ... 0.0.0.0:631->631/tcp ...
To set up a print queue inside the running container run bash inside the running container
(replace 9ae141335b1a with the CONTAINER ID shown by 'podman container list -a'):
# podman exec -it 9ae141335b1a bash
Set up a print queue inside the running container e.g. via
(replace 192.168.122.1 with the IP address of a network printer):
9ae141335b1a:/ # lpadmin -p testq -v socket://192.168.122.1:9100 -o printer-is-shared=true -E
Show the print queue inside the running container:
9ae141335b1a:/ # lpstat -p
printer testq is idle. enabled since ...
Exit bash inside the running container:
9ae141335b1a:/ # exit
The print queue inside the running container is a so called 'raw' queue
which means the queue only forwards print job data to its specified network printer
but the queue does not convert print job data into printer specific data
so printer specific data must be provided when printing to that queue.
As normal user on a client system check that the cupsd is accessible on the host where the container is running e.g. via
(replace 192.168.122.184 with the IP address of the host where the container is running):
user@client_system $ lpstat -h 192.168.122.184 -r
scheduler is running
As normal user on a client system show the print queue on the host where the container is running e.g. via
(replace 192.168.122.184 with the IP address of the host where the container is running):
user@client_system $ lpstat -h 192.168.122.184 -p
printer testq is idle. enabled since ...
As normal user on a client system send printer specific data to the queue e.g. via
(replace 192.168.122.184 with the IP address of the host where the container is running):
user@client_system $ lp -h 192.168.122.184 -d testq printer_specific_data_file
The network printer should print out the printer specific data.
As normal user on a client system show the completed print job e.g. via
(replace 192.168.122.184 with the IP address of the host where the container is running):
user@client_system $ lpstat -h 192.168.122.184 -W completed
testq-1 user ...
As normal user on a client system access the CUPS web frontend in a browser via this URL
(replace 192.168.122.184 with the IP address of the host where the container is running):
http://192.168.122.184:631/
Access to the admin pages of the CUPS web interface is forbidden by default in /etc/cups/cupsd.conf
inside the container (only "Order allow,deny" specifies that access is denied by default,
then Allow lines would be processed followed by Deny lines if such lines exist, see "man cupsd.conf").