1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > linux安装指定版本的谷歌浏览器 为Ubuntu安装指定版本的chrome浏览器

linux安装指定版本的谷歌浏览器 为Ubuntu安装指定版本的chrome浏览器

时间:2021-03-17 15:52:46

相关推荐

linux安装指定版本的谷歌浏览器 为Ubuntu安装指定版本的chrome浏览器

在将基于selenium的web 自动化用例容器化时,遇到了chrome stable版本升级到76,但是基础镜像 python-3.7.3不兼容的情况。为了解决这个问题,需要为镜像安装指定版本(73)的google chrome。

修改后的DockerFile相关内容如下,

# chome

RUN apt-get install software-properties-common -y

RUN add-apt-repository "deb /ubuntu $(lsb_release -sc) main universe restricted multiverse"

RUN apt-get update -y

RUN apt-get install -y libglib2.0-0=2.50.3-2 \

libnss3=2:3.26.2-1.1+deb9u1 \

libgconf-2-4=3.2.6-4+b1 \

libfontconfig1=2.11.0-6.7+b1

RUN apt-get install python-selenium python3-selenium -y

RUN wget /ubuntu/pool/universe/c/chromium-browser/chromium-browser_73.0.3683.103-0ubuntu1_amd64.deb

# 如果支持76+版本的chrome,可以直接使用以下命令安装stable版本

# RUN wget /linux/direct/google-chrome-stable_current_amd64.deb

RUN dpkg -i google-chrome-stable_current_amd64.deb --fix-missing; apt-get -fy install

# chrome_driver, 注意版本对应

RUN cd /bin && wget https://chromedriver./76.0.3809.126/chromedriver_linux64.zip && unzip chromedriver_linux64.zip

RUN chmod +x /bin/chromedriver

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。