dockerubuntuchromium

How to install chromium in Docker based on Ubuntu 19.10 and 20.04?


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.


Solution

  • 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