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

举报
建帅小伙儿 发表于 2022/09/25 02:16:47 2022/09/25
【摘要】 dockerfile制作,制作python3下的robotframework运行环境 FROM centos:7.6.1810 MAINTAINER The Ecs Automation Project testops_xxx@163.comENV PATH $PATH:/usr/local/python3/bin/ENV P...

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


   
  1. FROM centos:7.6.1810
  2. MAINTAINER The Ecs Automation Project testops_xxx@163.com
  3. ENV PATH $PATH:/usr/local/python3/bin/
  4. ENV PYTHONIOENCODING utf-8
  5. RUN set -ex
  6. && mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
  7. && curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  8. && yum makecache
  9. && sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
  10. && yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make wget
  11. && yum clean all
  12. && mkdir /usr/local/python3
  13. && wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz
  14. && tar -xvJf Python-3.6.8.tar.xz && rm -f Python-3.6.8.tar.xz
  15. && cd Python-3.6.8
  16. && ./configure prefix=/usr/local/python3
  17. && make && make install
  18. && cd ..
  19. && pip3 --default-timeout=1000 install --upgrade pip -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
  20. && pip3 --default-timeout=1000 install --upgrade setuptools -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
  21. && pip3 --default-timeout=1000 install robotframework-selenium2library -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
  22. && pip3 --default-timeout=1000 install robotframework -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
  23. && pip3 --default-timeout=1000 install robotframework-ride==1.5.2.1 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
  24. && && pip3 --default-timeout=1000 install pyvirtualdisplay -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
  25. && pip3 --default-timeout=1000 install robotframework-pabot -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
  26. && cd /etc/yum.repos.d/
  27. && yum -y install firefox
  28. && firefox --version
  29. RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
  30. && tar -zxf geckodriver-v0.24.0-linux64.tar.gz
  31. && mv geckodriver /usr/local/bin
  32. && firefox --version
  33. && cd /etc/
  34. && echo "106.11.210.201 g.alicdn.com" >> hosts
  35. && echo "100.67.79.188 ecs-buy.aliyun.com" >> hosts
  36. && echo "100.67.79.188 eci.console.aliyun.com" >> hosts
  37. && echo "100.67.79.188 ecs.console.aliyun.com" >> hosts
  38. RUN yum -y update
  39. && yum -y install httpd
  40. && yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make wget
  41. && 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
  42. && chmod +x jdk-8u131-linux-x64.rpm
  43. && rpm -ivh jdk-8u131-linux-x64.rpm
  44. CMD ["usr","bin","bash"]

文章来源: blog.csdn.net,作者:懿曲折扇情,版权归原作者所有,如需转载,请联系作者。

原文链接:blog.csdn.net/qq_41332844/article/details/126837478

【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。