You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`PORT` is an optional environment variable used to start the printer-app on a specified port. If not provided, it will start on the default port 8000 or, if port 8000 is busy, on 8001 and so on.
388
404
-**The container must be started in `--network host` mode** to allow the Printer-Application instance inside the container to access and discover printers available in the local network where the host system is in.
389
405
- Alternatively using the internal network of the Docker instance (`-p <port>:8000` instead of `--network host -e PORT=<port>`) only gives access to local printers running on the host system itself.
406
+
-`-v ghostscript-printer-app:/var/lib/ghostscript-printer-app` maps a volume for persistent storage.
407
+
- The following volume and device settings are crucial for USB printer access:
408
+
-`-v /dev/bus/usb:/dev/bus/usb:ro` mounts the host's USB device directory read-only inside the container for USB printer access.
409
+
-`--device-cgroup-rule='c 189:* rmw'` allows the container to read, write, and mknod to USB devices.
390
410
391
-
### Setting Up and Running gutenprint-printer-app locally
411
+
### Setting Up and Running ghostscript-printer-app locally
392
412
393
413
#### Prerequisites
394
414
@@ -424,18 +444,30 @@ Once the rock is built, you need to compile docker image from it.
-`PORT` is an optional environment variable used to start the printer-app on a specified port. If not provided, it will start on the default port 8000 or, if port 8000 is busy, on 8001 and so on.
437
465
-**The container must be started in `--network host` mode** to allow the Printer-Application instance inside the container to access and discover printers available in the local network where the host system is in.
438
466
- Alternatively using the internal network of the Docker instance (`-p <port>:8000` instead of `--network host -e PORT=<port>`) only gives access to local printers running on the host system itself.
467
+
-`-v ghostscript-printer-app:/var/lib/ghostscript-printer-app` maps a volume for persistent storage.
468
+
- The following volume and device settings are crucial for USB printer access:
469
+
-`-v /dev/bus/usb:/dev/bus/usb:ro` mounts the host's USB device directory read-only inside the container for USB printer access.
470
+
-`--device-cgroup-rule='c 189:* rmw'` allows the container to read, write, and mknod to USB devices.
0 commit comments