前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >dockerfile制作:制作python3下的robotframework运行环境

dockerfile制作:制作python3下的robotframework运行环境

作者头像
懿曲折扇情
发布2022-08-24 12:58:55
3000
发布2022-08-24 12:58:55
举报
文章被收录于专栏:建帅技术分享

dockerfile制作,制作python3下的robotframework运行环境

代码语言:javascript
复制
FROM centos:7.6.1810

MAINTAINER The Ecs Automation Project testops_xxx@163.com
ENV PATH $PATH:/usr/local/python3/bin/
ENV PYTHONIOENCODING utf-8
RUN set -ex
&& mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
&& curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
&& yum makecache
&& sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
&& yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make wget
&& yum clean all
&& mkdir /usr/local/python3
&& wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz
&& tar -xvJf Python-3.6.8.tar.xz && rm -f Python-3.6.8.tar.xz
&& cd Python-3.6.8
&& ./configure prefix=/usr/local/python3
&& make && make install
&& cd ..
&& pip3 --default-timeout=1000 install --upgrade pip -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
&& pip3 --default-timeout=1000 install --upgrade setuptools -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
&& pip3 --default-timeout=1000 install robotframework-selenium2library -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
&& pip3 --default-timeout=1000 install robotframework -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
&& pip3 --default-timeout=1000 install robotframework-ride==1.5.2.1 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
&& && pip3 --default-timeout=1000 install pyvirtualdisplay -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
&& pip3 --default-timeout=1000 install robotframework-pabot -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
&& cd /etc/yum.repos.d/
&& yum -y install firefox
&& firefox --version
RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
&& tar -zxf geckodriver-v0.24.0-linux64.tar.gz
&& mv geckodriver /usr/local/bin
&& firefox --version
&& cd /etc/
&& echo "106.11.210.201 g.alicdn.com" >> hosts
&& echo "100.67.79.188 ecs-buy.aliyun.com" >> hosts
&& echo "100.67.79.188 eci.console.aliyun.com" >> hosts
&& echo "100.67.79.188 ecs.console.aliyun.com" >> hosts

RUN yum -y update
&& yum -y install httpd
&& yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make wget
&& wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
&& chmod +x jdk-8u131-linux-x64.rpm
&& rpm -ivh jdk-8u131-linux-x64.rpm
CMD ["usr","bin","bash"]
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • dockerfile制作,制作python3下的robotframework运行环境
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档