Comments (27)
Please refer to https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/6509
from alpine-chrome.
@jlandure I'm currently building chromium as @lygstate suggested. Will create a PR if I succeed.
from alpine-chrome.
Hi @lygstate 👋
Thanks for your feedback.
I'm interested to help you.
Can you describe a usecase with some code and the error you get?
Is it something like describe on this image here?
from alpine-chrome.
I found that only need pack swiftshader libegl and libglesv2
from alpine-chrome.
Hi @lygstate
Thanks for the update. 👍
Do you think it could be useful for the community to get a zenika/alpine-chrome:with-webgl
adding the missing packages ? Can you share a tiny example that works well?
Thanks for your contribution 🙌
from alpine-chrome.
@jlandure Need pacth the upstrem chromium packages:)
https://git.alpinelinux.org/aports/tree/community/chromium
But don't know where to start, patch file added
@@ -294,6 +269,11 @@ package() {
done
paxmark -m "$pkgdir"/usr/lib/$pkgname/chrome
+ install -Dm4755 libEGL.so "$pkgdir"/usr/lib/$pkgname/libEGL.so
+ install -Dm4755 libGLESv2.so "$pkgdir"/usr/lib/$pkgname/libGLESv2.so
+
+ install -Dm4755 swiftshader/libEGL.so "$pkgdir"/usr/lib/$pkgname/swiftshader/libEGL.so
+ install -Dm4755 swiftshader/libGLESv2.so "$pkgdir"/usr/lib/$pkgname/swiftshader/libGLESv2.so
install -Dm4755 chrome_sandbox "$pkgdir"/usr/lib/$pkgname/chrome-sandbox
install -m644 icudtl.dat "$pkgdir"/usr/lib/$pkgname/icudtl.dat
from alpine-chrome.
I've also come here looking for the same thing! A zenika/alpine-chrome:with-webgl
would be perfect and very much appreciated.
from alpine-chrome.
Hi @maxcct @lygstate 👋
I've tried several things today to add webgl
support to the headless chrome.
Here is the PullRequest #29
But It's not working...
I would like to get these outputs
chromium-browser --headless --disable-dev-shm-usage --no-sandbox --screenshot --hide-scrollbars https://webglfundamentals.org/webgl/webgl-fundamentals.html
Got
and expected is
chromium-browser --headless --disable-dev-shm-usage --no-sandbox --screenshot --hide-scrollbars https://browserleaks.com/webgl
Got
and expected is
Can you help me to make this zenika/alpine-chrome:with-webgl
working? 👍
You can also launch these tests using puppeteer
with:
node src/webgl.js
from alpine-chrome.
@jlandure you need recompile chrome, use mesa gles not working, I've tried.
from alpine-chrome.
Hi @lygstate 😊
Sorry for the delay.
I didn't achieve with success to recompile Chrome for the webgl support. 😣
Can you help me giving me the commands to recompile Chromium? 😇
Thanks!
from alpine-chrome.
I'm struggling with the same problem, any update on this?
from alpine-chrome.
Sorry, wait a minute
from alpine-chrome.
Change the APKBUILD file
package() {
cd "$builddir"/out/$_buildtype
local bin pak
# paxmark inside chroot too
paxmark -m mksnapshot
# Installed files refere to
# https://launchpad.net/ubuntu/disco/amd64/chromium-browser
# https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
# https://www.slimjet.com/chrome/google-chrome-old-version.php
for bin in chrome chromedriver *.bin; do
install -Dm755 $bin "$pkgdir"/usr/lib/$pkgname/$bin
done
paxmark -m "$pkgdir"/usr/lib/$pkgname/chrome
install -Dm755 swiftshader/libEGL.so "$pkgdir"/usr/lib/$pkgname/swiftshader/libEGL.so
install -Dm755 swiftshader/libGLESv2.so "$pkgdir"/usr/lib/$pkgname/swiftshader/libGLESv2.so
install -Dm4755 chrome_sandbox "$pkgdir"/usr/lib/$pkgname/chrome-sandbox
install -m644 icudtl.dat "$pkgdir"/usr/lib/$pkgname/icudtl.dat
install -Dm755 xdg-mime "$pkgdir"/usr/lib/$pkgname/xdg-mime
install -Dm755 xdg-settings "$pkgdir"/usr/lib/$pkgname/xdg-settings
for pak in *.pak; do
install -Dm644 $pak "$pkgdir"/usr/lib/$pkgname/$pak
done
install -Dm755 "$srcdir"/chromium-launcher.sh \
"$pkgdir"/usr/lib/$pkgname/chromium-launcher.sh
cp -a locales "$pkgdir"/usr/lib/$pkgname/
cp -a MEIPreload "$pkgdir"/usr/lib/$pkgname/
# It is important that we name the target "chromium-browser",
# xdg-utils expect it; bug #355517.
mkdir -p "$pkgdir"/usr/bin
cd "$pkgdir"/usr/bin
ln -sf /usr/lib/$pkgname/chromium-launcher.sh chromium-browser
ln -sf /usr/lib/$pkgname/chromedriver "$pkgdir"/usr/bin/
install -Dm644 "$srcdir"/chromium.conf \
"$pkgdir"/etc/chromium/chromium.conf
install -Dm644 "$srcdir"/chromium.desktop \
"$pkgdir"/usr/share/applications/chromium.desktop
cd "$builddir"
for size in 24 48 64 128 256; do
install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
done
for size in 16 32; do
install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
done
}
from alpine-chrome.
Basically,copy the file content of swiftshader
install -Dm755 swiftshader/libEGL.so "$pkgdir"/usr/lib/$pkgname/swiftshader/libEGL.so
install -Dm755 swiftshader/libGLESv2.so "$pkgdir"/usr/lib/$pkgname/swiftshader/libGLESv2.so
from alpine-chrome.
@lygstate You got it working? Would you mind creating a PR with a working Dockerfile?
from alpine-chrome.
@lygstate Please help us with this problem 👍
Open a PR or update the branch of the #29
from alpine-chrome.
@lygstate you got it working? I copied the file content of swiftshader but it still doesn't work for me. How did you recompile chromium?
from alpine-chrome.
Any news @lygstate @pxlrbt ? 👍
from alpine-chrome.
@jlandure It's still building on my machine. And if it's successful I still need to integrate it into your Dockerfile. Somehow I could install alpine-sdk
yesterday which is required.
from alpine-chrome.
@jlandure Compilation is finally done and it worked with the example chromium-browser --headless --disable-dev-shm-usage --no-sandbox --screenshot --hide-scrollbars https://webglfundamentals.org/webgl/webgl-fundamentals.html
.
I will check how to fix the issue with alpine-sdk after the weekend. Then I can update the Dockerfile.
from alpine-chrome.
@jlandure I got all issues before compilation step fixed within the Dockerfile. I am currently running a build on Docker Hub since last build took about 1,5 days on my machine. Maybe it's faster, maybe it will be aborted. Will create a PR if build is successfull.
from alpine-chrome.
@jlandure I created a PR with a prebuilt and a build from source version here: #50
from alpine-chrome.
Hi @pxlrbt
Thanks for your work! 🙌 How much times does it take to compile Chromium?
I will have a look.
FYI, I think there is a way to use multi-stage build to create the binary and NOT storing in the repository 🤔
And... I have to create a contributor
section to reward the contribution 👍
Thanks again.
from alpine-chrome.
@jlandure It took around 1.5 days to compile chromium on my machine. Probably should have a look at @lygstates solutions here #51
I didn't test his result, but it looks way cleaner since he only add the missing libraries and there is no need to recompile chromium again when new versions are released.
from alpine-chrome.
@all-contributors please add @pxlrbt for question
from alpine-chrome.
I've put up a pull request to add @pxlrbt! 🎉
from alpine-chrome.
✅ This issue can be closed since this commit b5e7e1d 🎉
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
- Failed to write file pdf: No such file or directory (2) when using `print-to-pdf` HOT 1
- 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.