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

I'm trying to build chrome image but encountered error #657

Closed
linjin-harvey opened this issue Dec 19, 2023 · 9 comments
Closed

I'm trying to build chrome image but encountered error #657

linjin-harvey opened this issue Dec 19, 2023 · 9 comments

Comments

@linjin-harvey
Copy link

Command:
./images chrome -b 120.0.6099.109 -d 120.0.6099.713 -t selenoid/chrome:120.0

output:
2023/12/19 14:47:55 running command: docker build -t selenoid/dev_chrome:120.0.6099.109 --build-arg VERSION=120.0.6099.109 /var/folders/8f/7yjdzn9x55j8q5wf_pxbjjqw0000gn/T/images1521086691/chrome/apt
[+] Building 21.2s (5/5) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 854B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/browsers/base:7.4.1 20.4s
=> CACHED [1/2] FROM docker.io/browsers/base:7.4.1@sha256:69ce9a067c3c4700251c609cde7c2066f307c3b94c7aac35c9353c774825e239 0.0s
=> ERROR [2/2] RUN curl -s https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && echo 'deb [arch=amd64] https://dl.goog 0.7s

[2/2] RUN curl -s https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && echo 'deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/google.list && apt-get update && apt-get -y --no-install-recommends install iproute2 google-chrome-stable=120.0.6099.109 && sed -i -e 's@exec -a "$0" "$HERE/chrome"@& --no-sandbox --disable-gpu@' /opt/google/chrome/google-chrome && chown root:root /opt/google/chrome/chrome-sandbox && chmod 4755 /opt/google/chrome/chrome-sandbox && google-chrome --version && rm -Rf /tmp/* && rm -Rf /var/lib/apt/lists/*:
#5 0.234 Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
#5 0.638 gpg: no valid OpenPGP data found.


executor failed running [/bin/sh -c curl -s https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && echo 'deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/google.list && apt-get update && apt-get -y --no-install-recommends install iproute2 $PACKAGE=$VERSION && sed -i -e 's@exec -a "$0" "$HERE/chrome"@& --no-sandbox --disable-gpu@' /opt/google/$INSTALL_DIR/google-chrome && chown root:root /opt/google/$INSTALL_DIR/chrome-sandbox && chmod 4755 /opt/google/$INSTALL_DIR/chrome-sandbox && google-chrome --version && rm -Rf /tmp/* && rm -Rf /var/lib/apt/lists/*]: exit code: 2
2023/12/19 14:48:17 command error: build dev image: command execution error: exit status 1

@vania-pooh
Copy link
Member

vania-pooh commented Dec 20, 2023

@linjin-harvey don't get. Exactly what command fails in Dockerfile?

@linjin-harvey
Copy link
Author

linjin-harvey commented Dec 21, 2023

@vania-pooh
I'm using linux server instead of MAC to build the image, so above error gone. However I encounter another problem:
E: Version '120.0.6099.109-1' for 'google-chrome-stable' was not found

This is my command:

./images chrome -b 120.0.6099.109 -d 120.0.6099.713 -t selenoid/chrome:120.0

Then it shows: E: Version '120.0.6099.109' for 'google-chrome-stable' was not found
image

Please help to correct my commad, my purpose is to build chrome 120 and related 120 chromederiver image

@linjin-harvey
Copy link
Author

Same problem when I was using 119.0.6045.105-1 as chrome version

@linjin-harvey
Copy link
Author

@vania-pooh We have strict security policy so we need to upgrade our browser regular ASAS there is new version of chrome, but we cannot run our automation scripts without new version selenoid chrome image, that is why I want to figure out how I can build the image by myself.
Can you help to advise how can I create image for new version of chrome & chromedriver. Is there any other dependencies why aerokube not provide latest image on time when chrome & chromedriver upgraded?

@vania-pooh
Copy link
Member

@linjin-harvey Chrome team automatically removes previous version of Deb package when new version is released.

@linjin-harvey
Copy link
Author

@vania-pooh Seems need to update Dockerfile to add below package as dependency of google chrome stable

#5 133.2 Unpacking google-chrome-stable (120.0.6099.109-1) ...
#5 141.5 dpkg: dependency problems prevent configuration of google-chrome-stable:
#5 141.5 google-chrome-stable depends on libgbm1 (>= 17.1.0~rc2); however:
#5 141.5 Package libgbm1 is not installed.
#5 141.5 google-chrome-stable depends on libu2f-udev; however:
#5 141.5 Package libu2f-udev is not installed.
#5 141.5 google-chrome-stable depends on libvulkan1; however:
#5 141.5 Package libvulkan1 is not installed.

@linjin-harvey
Copy link
Author

close

@linjin-harvey
Copy link
Author

close

1 similar comment
@linjin-harvey
Copy link
Author

close

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

No branches or pull requests

2 participants