随着GUI应用程序的涌入移植到docker,从docker容器内打印到杯子的最佳方法是什么?@H_404_2@
注意:我不打算从容器内部运行杯子,因为这打破了与docker相关的单一服务范例.@H_404_2@
最佳答案
自我记录调查工作后如何实现这一目标.@H_404_2@
原文链接:https://www.f2er.com/docker/436231.html使用基于Ubuntu的docker主机安装在杯子插槽中工作得很好… ish(acroread无法填充打印机),但是使用Redhat主机失败了.@H_404_2@
@H_404_2@
...
-v /var/run/cups:/var/run/cups:ro
...
填充杯子client.conf似乎是一个更好的解决方案.@H_404_2@
@H_404_2@
cat /tmp/client.conf
#The ServerName directive specifies sets the remote server
# that is to be used for all client operations. That is,it
# redirects all client requests to the remote server. The
# default port number is 631 but can be overridden by adding
# a colon followed by the desired port number to the value.
# The default is to use the local server ("localhost").
ServerName
和docker启动参数:@H_404_2@
@H_404_2@
...
-v /tmp/client.conf:/etc/cups/client.conf:ro \
...
我还必须确保cups服务器绑定到docker0网桥并允许其他设备访问cups服务器:@H_404_2@
@H_404_2@
...
Listen *:631
...
一旦杯子重新启动并且杯子client.conf传递到容器中,我就能按预期打印.