在Docker中使用Google-Chrome

neekobn8  于 2023-08-01  发布在  Go
关注(0)|答案(1)|浏览(225)

我在docker容器上使用google-chrome时遇到了问题:当我用途:google-chrome --headless --no-sandbox --disable-gpu http://www.wp.pl然后我得到:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directoryWARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
我试着用--hedaless=new,它看起来像:google-chrome --headless=new --no-sandbox --disable-gpu http://www.wp.pl我唯一的问题是:Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type: [436:560:0721/065519.597607:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [436:560:0721/065519.597994:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [0721/065520.915802:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
我期待看到的html代码就像使用CURL

brccelvz

brccelvz1#

您可以尝试以下操作:
google-chrome --headless --no-sandbox --disable-gpu --disable-features=dbus http://www.wp.pl

相关问题