Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Initial Chromium image support for arm64 #524

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

sskorol
Copy link
Contributor

@sskorol sskorol commented May 3, 2022

Initial implementation of a Chromium image for arm64 which is required to run Selenoid on M1. See build-chromium.sh (TBR) for details or just pull sskorol/selenoid_chromium_vnc:100.0 for testing.

Note that your browsers.json should label this image as chrome:

        "chrome": {
		"default": "100.0",
		"versions": {
			"100.0": {
				"image": "sskorol/selenoid_chromium_vnc:100.0",
				"port": "4444"
			}
		}
	}

Your Selenium tests should pass a browserName = chrome capability as chromium isn't explicitly supported for filtering.

The base image was downgraded to ubuntu:18.04 as Focal doesn't have fresh updates for Chromium. Also, note that libgtk-3-0 package is required for the Chromium image. Otherwise, a browser just crashes in runtime with a 500 error from Selenoid.

Fixes #449

@vania-pooh feel free to review and revise if required. I haven't tested all the potential scenarios (with /local build and dev tools).

@codecov
Copy link

codecov bot commented May 30, 2022

Codecov Report

Merging #524 (fd7df2e) into master (e90d099) will decrease coverage by 0.36%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##           master    #524      +/-   ##
=========================================
- Coverage    6.24%   5.87%   -0.37%     
=========================================
  Files           7       8       +1     
  Lines         785     834      +49     
=========================================
  Hits           49      49              
- Misses        729     778      +49     
  Partials        7       7              
Flag Coverage Δ
go 5.87% <0.00%> (-0.37%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
build/chromium.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5568265...fd7df2e. Read the comment docs.

Copy link
Member

@vania-pooh vania-pooh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay.

  1. Need to delete devtools source code completely if there are no changes compared to Chrome. Instead copy source code to temporary context directory with Go code in chromium.go.
  2. Need to use Ubuntu 20.04 base image if possible. Ubuntu 18.04 end of support is in 2023.

All the rest seems to be OK.

static/chromium/devtools/main.go Outdated Show resolved Hide resolved
selenium/base/Dockerfile Outdated Show resolved Hide resolved
…d to run Selenoid on M1. See `build-chromium.sh` for details or just pull `sskorol/selenoid_chromium_vnc:100.0` for testing.

Note that your `browsers.json` should label this image as chrome. Your Selenium tests should also pass a `browserName = chrome` capability as `chromium` isn't explicitly supported for filtering.

Base image should be built with UBUNTU_VERSION=18.04 arg for M1 as Focal doesn't have fresh updates for Chromium. Also note that `libgtk-3-0` package is required for Chromium image. Otherwise, a browser just crashes in runtime with 500 error from Selenoid.

DevTools support was temporary removed due to an issue accessing Chrome sub-folder from Chromium docker context for further reusing during the build.
@sskorol sskorol force-pushed the add-arm64-chromium-support branch from ef468d4 to fd7df2e Compare June 23, 2022 10:12
@sskorol sskorol marked this pull request as ready for review June 23, 2022 10:13
@sskorol
Copy link
Contributor Author

sskorol commented Jun 23, 2022

@vania-pooh as discussed in a chat, devtools were temporary removed from PR. The other issue regarding the version was fixed. So feel free to review.

@vania-pooh vania-pooh merged commit 29d3651 into aerokube:master Jun 24, 2022
@vania-pooh
Copy link
Member

@sskorol thank you for contribution!

@bonigarcia
Copy link
Contributor

@vania-pooh Is there any plan to publish the Aerokube's browser images supporting ARM (e.g. for Chrome) in Docker Hub? Thanks!

@vania-pooh
Copy link
Member

@bonigarcia probably. :)

@pavelbrylov
Copy link

@vania-pooh any chance you guys can publish arm images? It would be super helpful, we only keep x86 nodes for moon and selenoid tests. Thanks in advance!

@vania-pooh
Copy link
Member

@pavelbrylov usually people need to test under Google Chrome and this is not possible with ARM64, only Chromium.

@gromanas
Copy link

gromanas commented Feb 14, 2024

Hello @sskorol! Could you please provide us a guideline/documentation on how we can create our own images? Thank you in advance! I have tried running the build-chromium.sh but I think I am missing something as the images produced is not working with selenoid contradictory to your baked image sskorol/selenoid_chromium_vnc:100.0 which is working like a charm. Also, I would like to thank you again!

Just to add that I am getting the following error:

#5 120.7 dpkg-deb: error: 'chromium-browser.deb' is not a Debian format archive
#5 120.7 dpkg: error processing archive chromium-browser.deb (--install):
#5 120.7  dpkg-deb --control subprocess returned error exit status 2
#5 120.7 Errors were encountered while processing:

@nickmsix
Copy link

nickmsix commented Apr 2, 2024

Hello @sskorol! Thank you for your work. Tried to build an image using build-chromium.sh but unsuccesfull. Can you make some step-by-step guideline/documentation on how to create an image using build-chromium.sh? Thank you.

@nickmsix
Copy link

nickmsix commented Apr 2, 2024

@vania-pooh still no plans to build arm images?

@gromanas
Copy link

gromanas commented Apr 2, 2024

@nickmsix I was able to create a latest image for chromium. You can check here gromanas/selenoid_chromium_vnc:112.0. It is the latest released of chromium for arm64 ubuntu.

@nickmsix
Copy link

nickmsix commented Apr 2, 2024

@gromanas wow, your image works perfectly, greate job!!! 👍👍👍
Can you share detailed steps on how can make such images for future chromium releases?

@gromanas
Copy link

gromanas commented Apr 2, 2024

@nickmsix Glad that I helped. Will try. I need to find where such info can be hosted. Maybe a readme here or a post on a tech site. I will keep you posted.

@nickmsix
Copy link

nickmsix commented Apr 2, 2024

@gromanas Thank you very much! Appreciate it a lot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

how to build a arm64 chrome image?
7 participants