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"]