28

I have this simple docker file:

FROM ubuntu:eoan 

ENV DEBIAN_FRONTEND=noninteractive 

RUN apt update && apt install -y \ 
  chromium-browser \ 
  chromium-chromedriver

When I try to build it:

...
Preparing to unpack .../00-chromium-browser_77.0.3865.120-0ubuntu1.19.10.1_amd64.deb ...
=> Installing the chromium snap
==> Checking connectivity with the snap store
===> Unable to contact the store, trying every minute for the next 30 minutes

And it seems that it never reaches the said snap store. It works fine if the image is based on disco instead of eoan. It works fine on a physical machine.

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
Jeremad
  • 883
  • 2
  • 10
  • 21

1 Answers1

26

It's not a solution, it's a workaround. Just use google-chrome instead. I faced with this issue when suddenly in one day that docker image that always was building become broken. My case was like your: ubuntu 19.10 as a base for docker image.

RUN curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt-get install -y ./google-chrome-stable_current_amd64.deb
RUN rm google-chrome-stable_current_amd64.deb 
Glebsa
  • 492
  • 5
  • 9
  • 4
    Tip: Even though less readable making the three RUN stanzas one and chain them with `&&` causes the resulting image layers to be smaller. If `rm` is in a separate `RUN` the data will consume the place in the layer for the first `RUN`. – Kalle Richter May 01 '20 at 18:59
  • That's what we are doing as well. – Markus Müller May 08 '20 at 18:57
  • 4
    Sadly this does not work with ARM chips such as the Raspberry Pi. Any Ideas? – Jörg Rech Nov 25 '20 at 18:35
  • 2
    using `apt-get install chromium` worked in my docker build. there's also this beta option that i was about to try: https://fosspost.org/chromium-deb-package-ubuntu-20-04/ – steven hurwitt Dec 02 '20 at 04:08
  • @JörgRech for ARM (Raspberry Pi) it is useful to use these binaries (.deb) https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/20359945 – ahz Dec 17 '20 at 11:39
  • 3
    for me this does not work as it has many unmet dependencies: The following packages have unmet dependencies: `Depends: fonts-liberation but it is not installable Depends: libasound2 (>= 1.0.16) but it is not installable Depends: libatk-bridge2.0-0 (>= 2.5.3) but it is not installable Depends: libatspi2.0-0 (>= 2.9.90) but it is not installable Depends: libdrm2 (>= 2.4.38) but it is not installable Depends: libgbm1 (>= 8.1~0) but it is not installable Depends: libgtk-3-0 (>= 3.9.10) but it is not installable Depends: libnspr4 (>= 2:4.9-2~) but it is not installable...` – Andrei Diaconescu Jan 07 '21 at 13:51
  • @stevenhurwitt it works your answer for me. thanks – SefaUn Jan 17 '22 at 11:24