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
RUN echo "Acquire::Check-Valid-Until "false";\nAcquire::Check-Date "false";" | cat > /etc/apt/apt.conf.d/10no--check-valid-until
RUN sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
RUN sed -i 's#http://deb.debian.org#https://mirrors.163.com#g' /etc/apt/sources.list
RUN apt-get clean
RUN apt-get update -y && apt-get install -y icc-profiles-free
RUN apt-get update -y && apt-get install -y chromium
RUN echo 'export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --no-sandbox --disable-gpu"' >> /etc/chromium.d/default-flags
RUN echo " \n =============HTML2IMAGE============= \n Welcome to the html2image CLI container ! \n Type html2image -h for help :)" >> /etc/motd
RUN echo "clear" >> /root/.bashrc
RUN echo "cat /etc/motd" >> /root/.bashrc
[1026/042946.265913: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
[1026/042946.266046: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
[1026/042946.268083:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[1026/042946.271534:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is disabled, ANGLE is
[1026/043157.712559:ERROR:headless_shell.cc(434)] Abnormal renderer termination.
The text was updated successfully, but these errors were encountered:
DockerFile:
`
FROM python:3.7
EXPOSE 9567
WORKDIR /app
COPY . /app
RUN echo "Acquire::Check-Valid-Until "false";\nAcquire::Check-Date "false";" | cat > /etc/apt/apt.conf.d/10no--check-valid-until
RUN sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
RUN sed -i 's#http://deb.debian.org#https://mirrors.163.com#g' /etc/apt/sources.list
RUN apt-get clean
RUN apt-get update -y && apt-get install -y icc-profiles-free
RUN apt-get update -y && apt-get install -y chromium
RUN echo 'export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --no-sandbox --disable-gpu"' >> /etc/chromium.d/default-flags
RUN echo " \n =============HTML2IMAGE============= \n Welcome to the html2image CLI container ! \n Type html2image -h for help :)" >> /etc/motd
RUN echo "clear" >> /root/.bashrc
RUN echo "cat /etc/motd" >> /root/.bashrc
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install -r requirements.txt
`
requirements.txt
`
Pillow
pytest
html2image
`
python script
`
from html2image import Html2Image
hti = Html2Image(custom_flags=['--no-sandbox','--disable-gpu', '--disable-software-rasterizer'])
hti.screenshot(url='http://www.python.org', save_as='python_org.png', size = (1500, 13000))
`
error info:
[1026/042946.265913: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
[1026/042946.266046: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
[1026/042946.268083:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[1026/042946.271534:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is disabled, ANGLE is
[1026/043157.712559:ERROR:headless_shell.cc(434)] Abnormal renderer termination.
The text was updated successfully, but these errors were encountered: