Comments (1)
What is the execution context? How do you run the container?
Cannot reproduce it on direct call to chromium-browser ... --print-to-pdf='/tmp/test.pdf' ...
from an image built from the dockerfile you gave.
$ cat Dockerfile
FROM alpine:3.17
RUN apk upgrade --no-cache --available \
&& apk add --no-cache \
chromium-swiftshader \
ttf-freefont \
font-noto-emoji \
&& apk add --no-cache \
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing \
font-wqy-zenhei
# I tried with these too, same error
# RUN mkdir -p /usr/src/app \
# && adduser -D chrome \
# && chown -R chrome:chrome /usr/src/app
# USER chrome
# WORKDIR /usr/src/app
ENV CHROME_BIN=/usr/bin/chromium-browser \
CHROME_PATH=/usr/lib/chromium/
ENV CHROMIUM_FLAGS="--disable-dev-shm-usage --disable-software-rasterizer"
$ docker image build -t test .
[+] Building 27.5s (7/7) FINISHED
=> [internal] load build definition from Dockerfile
=> => transferring dockerfile: 657B
=> [internal] load .dockerignore
=> => transferring context: 2B
=> [internal] load metadata for docker.io/library/alpine:3.17
=> [auth] library/alpine:pull token for registry-1.docker.io
=> [1/2] FROM docker.io/library/alpine:3.17@sha256:124c7d2707904eea7431fffe91522a01e5a861a624ee31d03372cc1d138a3126
=> => resolve docker.io/library/alpine:3.17@sha256:124c7d2707904eea7431fffe91522a01e5a861a624ee31d03372cc1d138a3126
=> => sha256:9ed4aefc74f6792b5a804d1d146fe4b4a2299147b0f50eaf2b08435d7b38c27e 1.47kB / 1.47kB
=> => sha256:124c7d2707904eea7431fffe91522a01e5a861a624ee31d03372cc1d138a3126 1.64kB / 1.64kB
=> => sha256:b6ca290b6b4cdcca5b3db3ffa338ee0285c11744b4a6abaa9627746ee3291d8d 528B / 528B
=> [2/2] RUN apk upgrade --no-cache --available && apk add --no-cache chromium-swiftshader ttf-freefont font-noto-emoji && apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge
=> exporting to image
=> => exporting layers
=> => writing image sha256:21a08a622a103c30aabf55b2e2b5671240dd5cc0c95866ec5c74d813c163ec80
=> => naming to docker.io/library/test
$ docker run -it test /bin/sh
/ # chromium-browser --headless --no-sandbox --disable-setuid-sandbox --disable-gpu --disable-dev-shm-usage --run-all-compositor-stages-before-draw --print-to-pdf='/tmp/test.pdf' /tmp/test.html
[0510/100150.474000:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[0510/100150.487552:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[0510/100150.487759:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[0510/100150.488013:WARNING:dns_config_service_linux.cc(429)] Failed to read DnsConfig.
[0510/100150.496589:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[0510/100150.509475:WARNING:sandbox_linux.cc(393)] InitializeSandbox() called with multiple threads in process gpu-process.
[0510/100150.558819:WARNING:dns_config_service_linux.cc(429)] Failed to read DnsConfig.
4576 bytes written to file /tmp/test.pdf
/ #
from alpine-chrome.
Related Issues (20)
- Arm64 cpu startup card is stuck, Unable to use HOT 4
- Please add tzdata
- Node 18 now LTS HOT 2
- pulseaudio can't install in 102-with-puppeteer-xvfb HOT 1
- Chrome fails to load web page and crashes due to net::ERR_INSUFFICIENT_RESOURCES HOT 3
- Support --headless=new HOT 3
- zenika/alpine-chrome:100-with-puppeteer has segmentation fault during apk-upgrade HOT 2
- [Help-Wanted] How to run chrome in docker like `jlesage/firefox`
- R2Devops ❤️ zenika/alpine-chrome ! HOT 1
- WebGL not work as expected HOT 2
- How to configure supported locales for Intl apis
- cannot install alpine packages HOT 1
- Bun Support HOT 2
- Publish images to ghcr.io as well HOT 1
- How can I have/build a version of zenika/alpine-chrome:with-puppeteer for armv7? HOT 3
- Chrome hangs when taking a screenshot of a page with a large image HOT 3
- When using zenika/alpine-chrome:with-chromedriver docker image then in GitLab CI ChromeDriver was started successfully. is display but it get stuck and do nothing HOT 9
- Unable to load some pages(GPU crash) HOT 1
- Puppeteer version out of sync with Chromium
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alpine-chrome.