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

Require image for ARM64 architecture #1107

Closed
odidev opened this issue May 25, 2021 · 37 comments
Closed

Require image for ARM64 architecture #1107

odidev opened this issue May 25, 2021 · 37 comments
Milestone

Comments

@odidev
Copy link

odidev commented May 25, 2021

Hi Team,

I am trying to use the selenoid/vnc image on the arm64 platform but it seems it is not available for arm64.

I have successfully built the image using the command docker build -t <image_name> . on the arm64 platform by making some changes in the files .github/workflows/build.yml and ci/build.sh.

I have used Github actions to build and push the image for both the platforms.

Commit Link - odidev@67c0292

Github actions link - https://github.com/odidev/selenoid/runs/2662087679?check_suite_focus=true

Docker Hub Link - https://hub.docker.com/repository/registry-1.docker.io/odidev/selenoid/tags?page=1&ordering=last_updated

Do you have any plans on releasing arm64 images?

It will be very helpful if an arm64 image is available. If interested, I will raise a PR.

@vania-pooh
Copy link
Member

@odidev the problem is not building Selenoid for ARM - but rebuilding all browser images for ARM. :)

@odidev
Copy link
Author

odidev commented May 27, 2021

@vania-pooh
As you have mentioned in the above comment that there is a problem in rebuilding all browser images for arm64 and I have checked in dockerhub that there are different tags for selenoid/vnc image like firefox, opera and chrome but only one dockerfile is available in this repository.

After digging more on this, I have got another link where dockerfiles for firefox, opera and chrome is present but in these dockerfiles they are using different images like selenoid/dev_firefox, selenoid/dev_oper and selenoid/dev_chrome as base image which is only available for amd64 and I could not find source for these as well. I can help in building/uploading these images if you can provide the steps/source code for all these tags of selenoid/vnc image.

@vania-pooh
Copy link
Member

@Pavel077
Copy link

Hello.

@odidev were you able to build browser images for arm64?

@odidev
Copy link
Author

odidev commented Jul 19, 2021

I have successfully built the base image using the command docker build -t <image_name> . on the arm64 platform by making some changes in selenium/base/Dockerfile file and used the manually build browsers/base image. I have successfully built the browser images of chrome and Firefox on arm64 as well.

Please refer here for the changes done to build base image and browser images.

To build the opera image for arm64 opera-stable binary is required for arm64 but it is not available in the official release and it looks like source code for opera is private.

If we can make browser images available, I will raise PR with these changes.

@rubyangxg
Copy link

rubyangxg commented Sep 24, 2021

@odidev can you push your arm image to docker hub, i want a chrome or firefox image

@odidev
Copy link
Author

odidev commented Jan 12, 2022

@rubyangxg I have pushed arm64 images of both chrome and Firefox to my dockerhub account.

Chrome image link: https://hub.docker.com/repository/docker/odidev/chrome_arm64

Firefox image link: https://hub.docker.com/repository/docker/odidev/firefox_arm64

@gromanas
Copy link

gromanas commented Feb 12, 2022

@odidev Could you please provide some more context on how to use those custom images with selenoid? I can test those images. Thank you in advance

@gromanas
Copy link

@odidev I pulled your images and I tried to start a container of one of each, but I am not able, as they keep failing. The command I used is docker run odidev/chrome_arm64:latest.

@odidev
Copy link
Author

odidev commented Feb 15, 2022

@gromanas I pulled both the images and tried to start a container for both and container is starting successfully for both the image using command docker run -it image_name . Please see the log below for both the images.

For Chrome:


odidev@ubuntuarm:~/FAAS_Project$ docker pull odidev/chrome_arm64:latest 

latest: Pulling from odidev/chrome_arm64 

Digest: sha256:4c6a4ae2ce1a2fb0e914adea35670fc979b8a87e38ea39bc904175de9cadb3e5 

Status: Image is up to date for odidev/chrome_arm64:latest 

docker.io/odidev/chrome_arm64:latest 

odidev@ubuntuarm:~/FAAS_Project$ docker run -it odidev/chrome_arm64:latest 

root@67c8a836ad3e:/# uname -a 

Linux 67c8a836ad3e 5.4.0-64-generic #72-Ubuntu SMP Fri Jan 15 10:31:47 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux 

root@67c8a836ad3e:/# 

For Firefox:


odidev@ubuntuarm:~/FAAS_Project$ docker pull odidev/firefox_arm64:latest 

latest: Pulling from odidev/firefox_arm64 

Digest: sha256:68a51fa282925b17a66f444325d82ac228f48c3028937ca39c51249e7e6a271f 

Status: Image is up to date for odidev/firefox_arm64:latest 

docker.io/odidev/firefox_arm64:latest 

odidev@ubuntuarm:~/FAAS_Project$ docker run -it odidev/firefox_arm64:latest 

root@d929fa0aa24b:/# uname -a 

Linux d929fa0aa24b 5.4.0-64-generic #72-Ubuntu SMP Fri Jan 15 10:31:47 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux 

@gromanas
Copy link

@odidev Thank you very much for the quick response! Have you tried using them with Selenoid? Could you please provide an example? Thank you in advance!

@odidev
Copy link
Author

odidev commented Apr 21, 2022

@ gromanas

Here is the arm64 docker image for Selenoid which you can use it as per the requirement.

Docker hub link: https://hub.docker.com/repository/docker/odidev/selenoid_image

@vania-pooh vania-pooh added this to the 1.10.8 milestone Apr 22, 2022
@sskorol
Copy link

sskorol commented May 1, 2022

@odidev have you even tried to run your images with Selenoid? If you've built them the way you described -> directly via Dockerfile, it won't work out of the box. Selenoid team uses a go-driven process which assumes building not just a raw browser image, but also attaching a driver to it + a special entrypoint.
Moreover, your changes in Dockerfile for Chromium are based on Ubuntu 20.04, which has a set of known issues that prevent you from installing Chromium directly w/o snap.
On the other hand, if you take a look at the official packages of Ubuntu Focal, there's only an ancient Chromium version available. They don't ship new versions for Focal. So you should either fetch Chromium from 18.04 or 21.

P.S. I've also bashed to your chrome image and there's actually no chromium or chrome installed. I really appreciate your work. But how did you test your images besides checking OS info?

@sskorol
Copy link

sskorol commented May 3, 2022

FYI, created a draft PR aerokube/images#524 with a build script. Or you can test it with a prebuilt image.

@odidev
Copy link
Author

odidev commented May 4, 2022

@ sskorol

As chrome is not available for arm64 so I have installed chromium-browser in the Dockerfile through apt-get and released the arm64 image for chrome in my dockerhub, However I have not tested my arm64 chrome browser images with Selenoid.

Anyway thanks for the PR with a build script and prebuilt chromium arm64 image which will help to test images with Selenoid.

@sskorol
Copy link

sskorol commented May 4, 2022

@odidev but as I've mentioned above, a base image uses ubuntu:20.04 which doesn't ship new Chromium updates. Also, you can't install Chromium correctly on ubuntu:20.04 w/o snap. Here's a proof:

FROM ubuntu:20.04

RUN apt-get update && apt-get install -y chromium-browser

CMD ["chromium-browser", "--version"]

Then run it:

❯ docker run -it [your_image_name]

Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium

So the image you've built doesn't have either working Chromium or chromium-driver, unfortunately. However, when you change the base to ubuntu:18.04, it becomes a gamechanger.

@odidev
Copy link
Author

odidev commented May 4, 2022

@ sskorol

I have verified the chrome image which I have build for arm64 doesn't have working Chromium. Thanks for your suggestions and workaround.

vania-pooh added a commit to vania-pooh/selenoid that referenced this issue Jun 15, 2022
vania-pooh added a commit that referenced this issue Jun 15, 2022
Building a binary for arm64 (related to #1107)
vania-pooh added a commit to vania-pooh/selenoid that referenced this issue Jun 25, 2022
vania-pooh added a commit to vania-pooh/selenoid that referenced this issue Jun 25, 2022
vania-pooh added a commit that referenced this issue Jun 25, 2022
Automatically building image for linux/arm64 (related to #1107)
@vania-pooh
Copy link
Member

vania-pooh commented Jun 25, 2022

Seems to be fixed in #1237. Let's check that everything works and then release.

@gromanas
Copy link

gromanas commented Jul 4, 2022

Thank you very much! Are there any official arm64 images?

@vania-pooh
Copy link
Member

@gromanas not yet released. Will do during next days.

@gromanas
Copy link

gromanas commented Jul 4, 2022

Thank you very much for the quick response and the update!!!

@gromanas
Copy link

@vania-pooh Hello! I would like to ask if we have any updates concerning the arm64 browser images. Thank you in advance!

@vania-pooh
Copy link
Member

This one was released in https://github.com/aerokube/selenoid/releases/tag/1.10.8. However browser images are still not ready.

@gromanas
Copy link

@vania-pooh Thank you very much! Do you have any plans to support arm64 browser images? Any instructions on how to create our own? I have several issues following the official instrunctions. Thank you again in advance!

@vania-pooh
Copy link
Member

@gromanas probably, but no estimate exists.

@ggozad
Copy link

ggozad commented Nov 9, 2022

@vania-pooh is there something we could do to help release official browser images?

@aandryashin
Copy link
Member

aandryashin commented Nov 9, 2022 via email

@ggozad
Copy link

ggozad commented Nov 9, 2022

Hello! Please try this: https://github.com/aandryashin/moon-on-apple-silicon ср, 9 нояб. 2022 г., 13:05 Yiorgis Gozadinos @.***>:

Thanks!

Here's what I tried:
browsers.json

{
  "firefox": {
    "default": "latest",
    "versions": {
      "latest": {
        "image": "quay.io/browser/firefox:100.0.0-0",
        "port": "4444",
        "path": "/wd/hub",
        "tmpfs": { "/tmp": "size=512m" }
      }
    }
  },
  "chrome": {
    "default": "latest",
    "versions": {
      "latest": {
        "image": "quay.io/browser/chromium:100.0.4896.127-0",
        "port": "4444",
        "tmpfs": { "/tmp": "size=512m" }
      }
    }
  }
}

But then I see for both

behaving-selenoid-1  | 2022/11/09 10:29:38 [-] [NEW_REQUEST] [unknown] [192.168.96.4]
behaving-selenoid-1  | 2022/11/09 10:29:38 [-] [NEW_REQUEST_ACCEPTED] [unknown] [192.168.96.4]
behaving-selenoid-1  | 2022/11/09 10:29:38 [0] [LOCATING_SERVICE] [chrome] []
behaving-selenoid-1  | 2022/11/09 10:29:38 [-] [DEFAULT_VERSION] [Using default version: latest]
behaving-selenoid-1  | 2022/11/09 10:29:38 [0] [USING_DOCKER] [chrome] [latest]
behaving-selenoid-1  | 2022/11/09 10:29:38 [0] [CREATING_CONTAINER] [quay.io/browser/chromium:100.0.4896.127-0]
behaving-selenoid-1  | 2022/11/09 10:29:38 [0] [STARTING_CONTAINER] [quay.io/browser/chromium:100.0.4896.127-0] [cd3a81190d3c651ae6109749500efeb6ddbecb0a5c5ac62a37d71862ae1ff62f]
behaving-selenoid-1  | 2022/11/09 10:29:38 [0] [CONTAINER_STARTED] [quay.io/browser/chromium:100.0.4896.127-0] [cd3a81190d3c651ae6109749500efeb6ddbecb0a5c5ac62a37d71862ae1ff62f] [0.30s]
behaving-selenoid-1  | 2022/11/09 10:30:08 [0] [REMOVING_CONTAINER] [cd3a81190d3c651ae6109749500efeb6ddbecb0a5c5ac62a37d71862ae1ff62f]
behaving-selenoid-1  | 2022/11/09 10:30:09 [0] [CONTAINER_REMOVED] [cd3a81190d3c651ae6109749500efeb6ddbecb0a5c5ac62a37d71862ae1ff62f]
behaving-selenoid-1  | 2022/11/09 10:30:09 [0] [SERVICE_STARTUP_FAILED] [wait: http://192.168.96.5:4444 does not respond in 30s]

@aandryashin
Copy link
Member

aandryashin commented Nov 9, 2022 via email

@ggozad
Copy link

ggozad commented Nov 9, 2022

Arm64 images are working only with moon.

I see :)
Just so that I understand properly: Is selenoid going to provide images for arm64 or abandoning in favour of using moon?
I am happy to help make these images if there is a consistent way of doing so (and happy to try out moon in order to do that if it furthers building those images). But running Kubernetes is overkill for many projects.

@aandryashin
Copy link
Member

aandryashin commented Nov 9, 2022 via email

@ggozad
Copy link

ggozad commented Nov 9, 2022

Our further plan is to rewrite selenoid to use the same images that moon uses, then provide arm64 images for both moon and new selenoid. ср, 9 нояб. 2022 г., 15:27 Yiorgis Gozadinos @.***>:

I see, thank you @aandryashin for the insight!

@Haarolean
Copy link

Haarolean commented Apr 3, 2023

@aandryashin shouldn't this be reopened until the images are published?

@aandryashin
Copy link
Member

aandryashin commented Apr 3, 2023 via email

@nickmsix
Copy link

nickmsix commented Apr 2, 2024

@gromanas did you manage to find the solution for getting/generation the arm64 chrome/chromium images?

@gromanas
Copy link

gromanas commented Apr 2, 2024

@nickmsix Yes, although I have to do some changes in order to be able to produce the image in static/chromium/local/Dockerfile

@nickmsix
Copy link

nickmsix commented Apr 2, 2024

@gromanas Greate job!!! 👍
Please share detailed steps on how to make such images 🙏

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

No branches or pull requests

10 participants