Installing chrome and firebox in Ubuntu



This article mainly describes how to install chrome and firebox in docker file.


RUN apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
  gnupg \

RUN curl -sSL | apt-key add - \
    && echo "deb [arch=amd64] stable main" > /etc/apt/sources.list.d/google-chrome.list
RUN apt-get update
## xdg-icon-resource: No writable system icon directory found.
RUN apt-get install -y --force-yes --no-install-recommends hicolor-icon-theme
RUN apt-get install -y \
    google-chrome-stable \

If you can’t access, you need to download it and add it


RUN apt-get install -y --force-yes --no-install-recommends python-software-properties software-properties-common
RUN apt-add-repository ppa:mozillateam/firefox-next
RUN apt-get update
RUN apt-get install -y --force-yes --no-install-recommends firefox xvfb
RUN apt-get install -y --force-yes --no-install-recommends x11vnc x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps

The startup of firebox is a bit troublesome. You need to set XDG_ RUNTIME_ Dir. In addition, you need to start display

Xvfb :10 -ac &
export DISPLAY=:10

Install Chinese font

Because the default is English, if there is no Chinese font, access to Chinese websites will be garbled, you need to install the Chinese font

RUN apt-get install -y --force-yes --no-install-recommends \
        fonts-wqy-microhei \