我正在尝试使用
在chrome
图片中安装docker
浏览器
RUN apt-get install chromium-browser
但是我收到了错误:
Package chromium-browser is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'chromium-browser' has no installation candidate
如何在chromium
图片中正确安装docker
?
答案 0 :(得分:11)
如果您碰巧正在运行基于 Debian 的映像,那么您想要的软件包是 chromium
(与 chromium-browser
相比)。因此,对于此类图像,这将为您处理:
RUN apt-get install chromium -y
答案 1 :(得分:7)
我解决了它如下:
# install manually all the missing libraries
RUN apt-get install -y gconf-service libasound2 libatk1.0-0 libcairo2 libcups2 libfontconfig1 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libxss1 fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils
# install chrome
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install
答案 2 :(得分:2)
使用以下命令将chrome安装在docker容器中:
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb --fix-missing; apt-get -fy install`