Skip to content

Run without privileged argument #1

@murilopereirame

Description

@murilopereirame

Hey!

First of all, thanks a lot for this repo, helped me a lot to setup CUPS inside my homelab using Docker! Although, I did some research to run this without the --privileged and I achieved some good results using --device-cgroup-rules.

I used this article as reference. Using the cgroup we can give access to a specific group of devices instead of the amount of power that --privileged gives. It's possible to use the --device option but then hot plug doesn't work

Also, I added the --ulimit nofile=1024:1024 because new docker install have unlimited ulimit which causes CUPS crash and it doesn't start.

Here's my full docker run command:

docker run -p 631:631 --ulimit nofile=1024:1024 \
  -e CUPS_USER=admin \
  -e CUPS_PASS=admin \
  -v /dev/bus/usb:/dev/bus/usb \
  --device-cgroup-rule='c 189:* rmw' \
  docker.io/aguslr/cups:latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions