zenika / alpine-chrome Goto Github PK
View Code? Open in Web Editor NEWChrome Headless docker images built upon alpine official image
Home Page: https://hub.docker.com/r/zenika/alpine-chrome
License: Apache License 2.0
Chrome Headless docker images built upon alpine official image
Home Page: https://hub.docker.com/r/zenika/alpine-chrome
License: Apache License 2.0
Very useful to use with the Google Cloud Platform.
Reuse the hook from here
From an email
How to read the image generated after the screenshot?
The image is created into the mapped directory (to the volume) but the owner of the image is 1001 (root outside the container?):
-rw------- 1 1001 1001 2454 mar 8 16:48 screenshot.png
So I can't open the image until I've changed the permissions.
Any idea how to solve it?
After adding ENTRYPOINT ["tini", "--"]
it breaks the Puppeteer Docker image.
Reference commit:
7b4f2b3#diff-c29f529b3e98482e07a5768ff85c139dR9
Reproduce by:
docker run -it --rm -v $(pwd)/src:/usr/src/app/src --cap-add=SYS_ADMIN zenika/alpine-chrome:with-puppeteer node src/pdf.js
docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"tini\": executable file not found in $PATH": unknown.
ERRO[0001] error waiting for container: context canceled
Context
Context
What are you trying to do and how would you want to do it differently? Is it something you currently you cannot do? Is this related to an issue/problem?
Would like to clean the README and create a doc website for using this image.
There is too many sections in the README explaining the different usecases...
Perhaps a doc website using VuePress...
Like on this image: https://github.com/ebidel/try-puppeteer
Hello everybody !
I'm facing the following issue:
Describe the bug
I'm not able to reproduce the getting started instructions for Playwright
To Reproduce
Steps to reproduce the behavior:
$ docker image inspect --format='{{index .RepoDigests 0}}' zenika/alpine-chrome:with-playwright
zenika/alpine-chrome@sha256:c3a832060aa529bd0ca87bc60ff669015bcc5c8d5138c25b729aee5c2ae8cad6
docker container run -it --rm -v $(pwd):/usr/src/app --cap-add=SYS_ADMIN zenika/alpine-chrome:with-playwright npm start
> [email protected] start /usr/src/app
> node src/useragent
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module 'playwright-chromium'
Require stack:
- /usr/src/app/src/useragent.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/usr/src/app/src/useragent.js:1:22)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/src/app/src/useragent.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node src/useragent`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/chrome/.npm/_logs/2020-06-17T10_09_15_847Z-debug.log
What is the expected behavior?
As per the documentation:
A example-chromium.png file will be created in your with-playwright folder.
What is the actual behavior?
The above output - no png file created.
Possible solution
(Not found yet)
Logs
Log file 2020-06-17T10_09_15_847Z-debug.log
Versions
Software | Version(s) | How-to |
---|---|---|
Chromium | Chromium 83.0.4103.61 | docker run -it --rm --entrypoint "" zenika/alpine-chrome chromium-browser --version |
Image | zenika/alpine-chrome@sha256:c3a832060aa529bd0ca87bc60ff669015bcc5c8d5138c25b729aee5c2ae8cad6 | docker image inspect --format='{{index .RepoDigests 0}}' zenika/alpine-chrome |
Docker Engine Client | 19.03.11 | docker version |
Docker Engine Server | 19.03.5 | docker version |
Docker Machine | 0.16.2, build bd45ab1 | docker-machine version |
Darwin Kernel Version | 19.3.0 | |
MacOS version | Catalina 10.15.3 (19D76) |
Additional context
I also tried to replace require("playwright-chromium");
with require("playwright");
nothing better.
I found the following issue but it's not the same version so I'm not sure it's relevant.
Context
The base alpine-chrome is 135 MB. The web-gl
one is 138 MB.
Does it make sense to add it by default? ๐ค
Discussion
Please help to decide ๐
Context
See https://badgen.net/docker to use working badges
https://badgen.net/docker/size/zenika/alpine-chrome/latest
Alternatives
https://shields.io/
http://img.shields.io/docker/image-size/zenika/alpine-chrome/81
Describe the bug
I have a Jenkins with Kubernetes, and I would like to run a headless Chrome for unittesting (using Karma). I extended a Jenkins Agent image with alpine-chrome:with-node
and use that in my agent pods. However karma is not able to start Chrome:
[0920/093525.387820:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 202: Permission denied (13)
[0920/093525.474421:ERROR:gpu_channel_manager.cc(398)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
To Reproduce
Use this image:
FROM jenkins/jnlp-slave:alpine as jnlp
FROM alpine-chrome:with-node
USER root
RUN apk -U add openjdk8-jre
COPY --from=jnlp /usr/local/bin/jenkins-slave /usr/local/bin/jenkins-agent
COPY --from=jnlp /usr/share/jenkins/slave.jar /usr/share/jenkins/slave.jar
ENTRYPOINT ["/usr/local/bin/jenkins-agent"]
What is the expected behavior?
Karma able to start Chrome.
Logs
20 09 2019 09:35:24.438:INFO [launcher]: Starting browser Chrome
20 09 2019 09:35:32.813:ERROR [launcher]: Cannot start Chrome
[0920/093525.113146:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093525.387820:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 202: Permission denied (13)
[0920/093525.474421:ERROR:gpu_channel_manager.cc(398)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[0920/093525.505667:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093532.787035:ERROR:browser_process_sub_thread.cc(203)] Waited 1 ms for network service
20 09 2019 09:35:32.813:ERROR [launcher]: Chrome stdout:
20 09 2019 09:35:32.813:ERROR [launcher]: Chrome stderr: [0920/093525.113146:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093525.387820:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 202: Permission denied (13)
[0920/093525.474421:ERROR:gpu_channel_manager.cc(398)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[0920/093525.505667:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093532.787035:ERROR:browser_process_sub_thread.cc(203)] Waited 1 ms for network service
20 09 2019 09:35:32.818:INFO [launcher]: Trying to start Chrome again (1/2).
20 09 2019 09:35:33.093:ERROR [launcher]: Cannot start Chrome
[0920/093532.949748:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093532.961242:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 248: Permission denied (13)
[0920/093533.004353:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093533.005844:ERROR:gpu_channel_manager.cc(398)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[0920/093533.076144:ERROR:browser_process_sub_thread.cc(203)] Waited 3 ms for network service
20 09 2019 09:35:33.093:ERROR [launcher]: Chrome stdout:
20 09 2019 09:35:33.093:ERROR [launcher]: Chrome stderr: [0920/093532.949748:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093532.961242:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 248: Permission denied (13)
[0920/093533.004353:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093533.005844:ERROR:gpu_channel_manager.cc(398)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[0920/093533.076144:ERROR:browser_process_sub_thread.cc(203)] Waited 3 ms for network service
20 09 2019 09:35:33.096:INFO [launcher]: Trying to start Chrome again (2/2).
20 09 2019 09:35:33.373:ERROR [launcher]: Cannot start Chrome
[0920/093533.231075:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093533.244953:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 290: Permission denied (13)
[0920/093533.289019:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093533.289656:ERROR:gpu_channel_manager.cc(398)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[0920/093533.359067:ERROR:browser_process_sub_thread.cc(203)] Waited 3 ms for network service
20 09 2019 09:35:33.373:ERROR [launcher]: Chrome stdout:
20 09 2019 09:35:33.373:ERROR [launcher]: Chrome stderr: [0920/093533.231075:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093533.244953:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 290: Permission denied (13)
[0920/093533.289019:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0920/093533.289656:ERROR:gpu_channel_manager.cc(398)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[0920/093533.359067:ERROR:browser_process_sub_thread.cc(203)] Waited 3 ms for network service
20 09 2019 09:35:33.376:ERROR [launcher]: Chrome failed 2 times (cannot start). Giving up.
Versions
Software | Version(s) | How-to |
---|---|---|
Chromium | 76.0.3809.132 | docker run -it --rm --entrypoint "" zenika/alpine-chrome chromium-browser --version |
Image | a449df36 | docker image inspect --format='{{index .RepoDigests 0}}' zenika/alpine-chrome |
Docker Engine | 19.03.2 | docker version |
Additional context
I start Chrome with the following flags:
--headless
, --no-sandbox
, --disable-gpu
, --disable-software-rasterizer
, --disable-dev-shm-usage
, --disable-web-security
Since this commit my build pipeline is broken.
My docker image did this in the final step:
CMD ["node", "run"]
And it seems that having tini
set as the entrypoint breaks this behaviour.
Of course I can fix this in my Dockerfile
but this won't fix old revisions of images that are based off of alpine-chrome:with-puppeteer
. Was it a conscious decision to break existing behaviour?
Context
It could be useful to use a semver and not using the latest
tag.
Example: 76
, 76-with-node
, 76-with-puppeteer
Alternatives
None.
Has the feature been requested before?
Nope.
On OSX, I have this errors:
$ docker container run -it --rm --cap-add=SYS_ADMIN zenika/alpine-chrome stephane at MacBook-Pro-de-KLEIN.local (-)(master)
[0617/130836.688570:WARNING:dns_config_service_posix.cc(341)] Failed to read DnsConfig.
[0617/130836.693739:ERROR:gpu_process_transport_factory.cc(1009)] Lost UI shared context.
[0617/130836.698564:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/130836.698614:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/130836.789673:ERROR:gl_implementation.cc(292)] Failed to load /usr/lib/chromium/swiftshader/libGLESv2.so: Error loading shared library /usr/lib/chromium/swiftshader/libGLESv2.so: No such file or directory
[0617/130836.794153:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/130836.794245:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/130836.795285:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[0617/130836.837893:ERROR:gl_implementation.cc(292)] Failed to load /usr/lib/chromium/swiftshader/libGLESv2.so: Error loading shared library /usr/lib/chromium/swiftshader/libGLESv2.so: No such file or directory
[0617/130836.840525:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[0617/130836.840815:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/130836.840888:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/130836.908523:ERROR:gl_implementation.cc(292)] Failed to load /usr/lib/chromium/swiftshader/libGLESv2.so: Error loading shared library /usr/lib/chromium/swiftshader/libGLESv2.so: No such file or directory
[0617/130836.914651:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/130836.914733:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/130836.917125:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[0617/130836.966942:ERROR:gl_implementation.cc(292)] Failed to load /usr/lib/chromium/swiftshader/libGLESv2.so: Error loading shared library /usr/lib/chromium/swiftshader/libGLESv2.so: No such file or directory
[0617/130836.968933:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[0617/130836.969294:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/130836.969336:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/130836.970184:ERROR:service_manager_context.cc(219)] Attempting to run unsupported native service: /usr/lib/chromium/content_gpu.service
Hi,
npm
has not been found since the last update.
BR
Sebastian
When building a pptraas.com-like service, I had to write this in Dockerfile (and they add to layers ๐):
USER root
RUN apk add tini
USER chrome
ENTRYPOINT ['tini', '--']
I am guessing the need to reape zombie process is common, can we add tini
(or dumb-init
or alike) to base image?
Context
I wrote a post on dev.to. It could be nice to reuse the content to complete the README.md
Describe the bug
First I want to thank you for this image, which is really helpful for our build system.
However, since today it seems like chromium fails to start with, displaying the following error:
Error relocating /usr/lib/chromium/chrome: _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found
It looks like this happens since the last image was pushed (5 hours ago)
To Reproduce
Steps to reproduce the behavior:
docker container run -it --rm --entrypoint "" zenika/alpine-chrome chromium-browser --version
Error relocating /usr/lib/chromium/chrome: _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found
Error relocating /usr/lib/chromium/chrome: _ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found
Error relocating /usr/lib/chromium/chrome: _ZNSt19_Sp_make_shared_tag5_S_eqERKSt9type_info: symbol not found
I was able to reproduce the issue on multiple machines (mac and linux)
What is the expected behavior?
Chromium should be able to start and display its version
What is the actual behavior?
Chromium crashes
Possible solutions
I don't know yet but I'll try to dig in see if I find something.
If anybody knows how to fix it right away that would be greatly appreciated.
Versions
Software | Version(s) | How-to |
---|---|---|
Chromium | ? | docker run -it --rm --entrypoint "" zenika/alpine-chrome chromium-browser --version |
Image | zenika/alpine-chrome@sha256:794b317131be727d5b7489e42f28d62f400d1aa7ffade0948f0fd7942e9d27c9 | docker image inspect --format='{{index .RepoDigests 0}}' zenika/alpine-chrome |
Docker Engine | 19.03.2 | docker version |
Building the image on archlinux and running
chromium-browser --version
Will result in:
Error relocating /usr/lib/chromium/chrome: hb_font_funcs_set_glyph_h_advances_func: symbol not found
How can I remove page number when I use --print-to-pdf?
Describe the bug
From the tini lib
If you are using Docker 1.13 or greater, Tini is included in Docker itself. This includes all versions of Docker CE. To enable Tini, just pass the --init flag to docker run.
Context
Use https://img.shields.io/docker/stars/zenika/alpine-chrome.svg?style=flat-square to get it.
Currently, there is no webgl support.( Softversion)
Hi guys,
Hope you are doing well !
It would be awesome to have alpine chrome with selenium.
Is it something possible to add ?
Cheers,
X
Context
Thanks to @pxlrbt we have the so
libs compiled and available for swiftshader (see #50)
Alternatives
Can you achieve the same result doing that?
It could be interesting to get or generate the libs without rebuilding Chrome (1,5 day), getting the generated APK, unpacking it and retrieving the so
files.
RUN apk add --no-cache mesa-egl mesa-gles \
&& rm -rf /var/lib/apt/lists/* \
/var/cache/apk/* \
/usr/share/man \
/tmp/* \
&& mkdir /usr/lib/chromium/swiftshader/ \
&& cp /usr/lib/libGLESv2.so.2 /usr/lib/chromium/swiftshader/libGLESv2.so \
&& cp /usr/lib/libEGL.so.1 /usr/lib/chromium/swiftshader/libEGL.so
# && ln -s /usr/lib/libGLESv2.so.2 /usr/lib/chromium/swiftshader/libGLESv2.so \
# && ln -s /usr/lib/libEGL.so.1 /usr/lib/chromium/swiftshader/libEGL.so
# COPY swiftshader/libEGL.so /usr/lib/chromium/swiftshader/libEGL.so
# COPY swiftshader/libGLESv2.so /usr/lib/chromium/swiftshader/libGLESv2.so
RUN chmod 755 /usr/lib/chromium/swiftshader/libEGL.so
RUN chmod 755 /usr/lib/chromium/swiftshader/libGLESv2.so
It is not working... ๐ข
** Other alternative **
See @lygstate info
#50 (comment)
What do you think?
Hi, it would be awesome if you could publish images for ARM for running on Raspberry devices.
We are using puppeteer 1.12.0 in our project. For this version, we need chromium 73.x.x.x which was present in v3.10 branch. Recently version has been upgraded to 77.x.x.x, which broke our application. can you pls mention the branch which has chromium 73.x.x.x package?
Context
๐ก This is only an idea.
To get a smaller image, we could use the experimental features docker image build --squash
.
But it's not working on the Docker Hub. See docker/hub-feedback#955
Alternatives
I can do it on my laptop and upload it.
Here is the difference: only ~5MB
docker image inspect zenika/alpine-chrome --format='{{.Size}}'
393543827
docker image inspect zenika/alpine-chrome:latest-squash --format='{{.Size}}'
388574396
Conclusion
Not very useful at the moment. ๐
I'm extending the Chrome v72 image. This is my Dockerfile:
$ cat Dockerfile
FROM zenika/alpine-chrome:72
USER root
RUN apk update
When I build it, the apk command fails.
$ docker build --no-cache --rm -f Dockerfile .
Sending build context to Docker daemon 3.072kB
Step 1/3 : FROM zenika/alpine-chrome:72
---> 361552ddc6fb
Step 2/3 : USER root
---> Running in b7440d6d4cdb
Removing intermediate container b7440d6d4cdb
---> d906a9c502cf
Step 3/3 : RUN apk update
---> Running in 77125b8983dd
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.9/main: Bad file descriptor
WARNING: Ignoring APKINDEX.b89edf6e.tar.gz: Bad file descriptor
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.9/community: Bad file descriptor
WARNING: Ignoring APKINDEX.737f7e01.tar.gz: Bad file descriptor
fetch http://nl.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
ERROR: http://nl.alpinelinux.org/alpine/edge/community: Bad file descriptor
WARNING: Ignoring APKINDEX.49e1404d.tar.gz: Bad file descriptor
ERROR: http://nl.alpinelinux.org/alpine/edge/main: Bad file descriptor
WARNING: Ignoring APKINDEX.1ebd6aac.tar.gz: Bad file descriptor
4 errors; 115 distinct packages available
The command '/bin/sh -c apk update' returned a non-zero code: 4
thanks for the work; the image looks like exactly what I need.
However I'm having trouble executing the with-puppeteer example:
docker run -it --rm -v $(pwd)/src:/usr/src/app/src --cap-add=SYS_ADMIN zenika/alpine-chrome:with-puppeteer node src/pdf.js
docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: "tini": executable file not found in $PATH": unknown.
I'm running in on docker for OSX, in case that matters.
I also tried building a modified image (basically commenting out the ENTRYPOINT with tini) and then I get this error instead:
[0408/191634.027504:ERROR:headless_shell.cc(559)] Open multiple tabs is only supported when remote debugging is enabled.
Any clues on how can I troubleshoot or fix this?
inspiration from https://hub.docker.com/r/justinribeiro/chrome-headless/
I can't get either of the latest zenika/alpine-chrome
or zenika/alpine-chrome:with-node
images to successfully launch a browser. If I expand one of the readme examples, this is what happens:
> docker run -it --rm --entrypoint sh zenika/alpine-chrome
> /usr/src/app $ chromium-browser --headless --disable-gpu --disable-software-rasterizer --disable-dev-shm-usage --no-sandbox --dump-dom https://www.chromestatus.com/
Segmentation fault
The only way I've got that example to work is by using the image tagged zenika/alpine-chrome:13
.
Do you know what's going on?
Hi There. I am trying to set it up to use with docker-compose. However when I try to activate it the container keeps restarting and the terminal gives me:
[0511/154746.370034:WARNING:dns_config_service_posix.cc(335)] Failed to read DnsConfig.
docker-compose is as follows:
version: '3'
services:
testservice
build: ./installer
container_name: testservice
restart: always
ports:
- 9222:9222
From the lighthouse image:
https://github.com/ebidel/lighthouse-ci/blob/master/builder/Dockerfile#L35-L40
Describe the bug
Since the base image got the support of webgl
, the with-webgl
tag doesn't mean anything now.
webgl
folderThere is any option to grab screen to ffmpeg ?
I want to use this headless chrome to broadcast to youtube.
I now use https://github.com/kolyadin/live-video-broadcasting but this version crash all time
Error response from daemon: Container is not running
Describe the bug
We are currently unable to build our cucumber test images since 3227d27 overwrites the alpine 3.10 repositories from the build, leaving only edge behind. While this may be necessary (not sure if it is) for the installation of chromium, I think it would be good practice to restore the original configuration afterwards.
There's also some feedback on the commit, requesting to open a ticket. I couldn't find one, so here it is.
To Reproduce
Steps to reproduce the behavior:
zenika/alpine-chrome@sha256:e436385b09839d8f6cd69f3a13a5decd74ea7e2e64a832129c27dc2ac9e64e71
FROM zenika/alpine-chrome:latest
RUN apk add bash
Step 3/10 : RUN apk add bash
---> Running in 5b44d631b561
fetch http://nl.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
readline-8.0.1-r0:
masked in: @edge
satisfies: bash-5.0.11-r0[so:libreadline.so.8]
bash-5.0.11-r0:
masked in: @edge
satisfies: world[bash]
The command '/bin/sh -c apk add bash' returned a non-zero code: 2
Fails due to the unavailability of apk "normal" repositories; Only bash@edge
would be supported.
What is the expected behavior?
We'd like to be able to install packages from stable alpine again, without being forced to use (potentially unstable) edge versions.
What is the actual behavior?
See error above
Possible solution
Ideas:
Versions
Software | Version(s) |
---|---|
Chromium | Chromium 77.0.3865.75 |
Image | zenika/alpine-chrome@sha256:e436385b09839d8f6cd69f3a13a5decd74ea7e2e64a832129c27dc2ac9e64e71 |
Docker Engine | 18.018.09 |
Additional Context
Since this also affects :77, this leaves us completely unable to use the image altogether. Alpine has removed older versions of the chromedriver from their 3.10 repositories, leaving version 77 as only option. That, in turns, only supports chromium 77 and above, which means the :76 tag will not work for us, either.
I've tried to use it in my docker image based on zenika/alpine-chrome.
see dockerfile here: https://github.com/SuddenGunter/pandaren/tree/master/cmd
It didn't work for me, so I just try tried to do docker run zenika/alpine-chrome - same error.
Error message (happens in both cases)
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
[0625/214704.494573:FATAL:zygote_host_impl_linux.cc(187)] Check failed: ReceiveFixedMessage(fds[0], kZygoteBootMessage, sizeof(kZygoteBootMessage), &boot_pid).
Received signal 6
r8: 00000000000000c1 r9: 00007fb2bce9314c r10: 0000000000000008 r11: 0000000000000246
r12: 00007ffec57e1860 r13: 00000000000000a0 r14: 000055c1b5d4ba64 r15: 00007ffec57e1880
di: 0000000000000002 si: 00007ffec57e1730 bp: 00007ffec57e1730 bx: 0000000000000006
dx: 0000000000000000 ax: 0000000000000000 cx: 00007fb2bce49fa0 sp: 00007ffec57e1718
ip: 00007fb2bce49fa0 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.
Environment:
macOS 10.14.5
docker v2.0.0.3 (31259), engine: 18.09.2
I am attempting to use Chrome to take some screenshots.
Here is a screenshot taken on Alpine docker container run -it --rm -v $(pwd):/usr/src/app --security-opt seccomp=$(pwd)/chrome.json zenika/alpine-chrome --screenshot --no-sandbox --hide-scrollbars --window-size=1200,630 https://github.com/Zenika/alpine-chrome
and a screenshot taken on macOS chromium --headless --use-gl=swiftshader --disable-software-rasterizer --disable-dev-shm-usage --screenshot --no-sandbox --hide-scrollbars --window-size=1200,630 https://github.com/Zenika/alpine-chrome
You can see in the Alpine screenshot, that all of the text appears super pixelated.
Any ideas?
Note: The Alpine screenshot looks much fuzzier in macOS finder than it does in the GitHub upload.
Hey,
first of all - thank you for this repo. You helped me in solving quite an annoying issue.
Thank you!
Secondly, I've found in Dockerfile quite intriguing lines:
Lines 22 to 31 in 2d0b861
Just wanted to mention that this will not minimize image size.
Each command creates a layer. Each layer adds a size of appended changes. Running cleanup commands in a separate layer will append 0-byte changes. It won't affect overall image size
There're few ways to fix this:
--squash
optionRUN
COPY
of script and RUN
which will install&cleanup)Cheers! :)
Context
One of our projects has created some debian image with node+chrome installed to be able to create PDFs.
But our standard for now of base images is alpine. Is you alpine-chrome image capable to do? I did a lot of reading about chrome and alpine, and came quickly to chromium installation. But the guy told me that chromium can't be used for the PDF generation, he needs the real chrome.
Regards
Walter
Hi
I'm having stability issues with chromium77 on alpine edge, (selenium freezes), I like to use alpine stable (v3.10). I also like to use chromium76, the only chromium I found in stable was chrome73.
I currently use ubuntu 18.04 but it is 1.5GB large, while the alpine edge is only 384MB.
Have a look to https://docs.docker.com/docker-hub/builds/automated-testing/
Hi, you have a bug in the docker image with-puppeter, if you don't add a path "/usr/src/app" in the command "npm install", you will recived a error message in the execution.
module.js:549
throw err;
^
Error: Cannot find module 'puppeteer'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/usr/src/app/pdf.js:1:81)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Then, if you modify the command for "RUN npm install /usr/src/app" you will resolved the problem. Best regards.
Describe the bug
I am trying to download a file programmatically. The script runs fine outside of the container, but fails to download the file when I run it inside the container. All other steps in the Playwright script execute OK.
this is how I run my container :
docker container run -it --rm --ipc=host --security-opt seccomp=chrome.json -v $(pwd)/src:/usr/src/app/src ilyaanoskov/file-downloader node src/index
What is the expected behavior?
The expected behavior is that the script downloads the file locally to a /tmp folder (just like Playwright does) and then I upload this file to S3
What is the actual behavior?
The script fails to download the file, hanging in the process
Logs
pw:api attempting page.click action +6ms
pw:api waiting for element to be displayed, enabled and not moving +1ms
pw:api element is displayed and does not move +110ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +40ms
pw:api checking that element receives pointer events at (435,360.09) +235ms
pw:api element does receive pointer events, continuing input action +155ms
pw:api performing page.click action +1ms
pw:api page.click action done +57ms
pw:api waiting for scheduled navigations to finish +4ms
pw:api navigations have finished +40ms
pw:api <= page.click succeeded +1ms
pw:api <= page.waitForEvent failed +29s
(node:8) UnhandledPromiseRejectionWarning: TimeoutError: Timeout 30000ms exceeded during page.waitForEvent.
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
at ProgressController.run (/usr/src/app/node_modules/playwright/lib/progress.js:72:30)
at Page.waitForEvent (/usr/src/app/node_modules/playwright/lib/extendedEventEmitter.js:30:35)
at /usr/src/app/src/index.js:57:10
(node:8) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
(node:8) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.