安装环境:win10
一)安装前检查(使用securable.exe 或 LeoMoon CPU-V.exe):
-
系统硬件是否支持虚拟化技术?
-
BIOS中是否已启用?
二)安装虚拟机CentOS7:
-
下载vmware workstation pro:https://www.vmware.com/cn/products/workstation-pro/workstation-pro-evaluation.html
-
安装vmware workstation pro
-
利用vmware workstation pro安装虚拟机CentOS7
-
挂载宿主机共享目录:https://blog.csdn.net/jasonhector/article/details/78679135
三)安装docker:
-
在虚拟机里安装:https://blog.51cto.com/taoismli/2171045
-
在虚拟机里配置镜像仓库:https://blog.51cto.com/taoismli/2171108
-
在虚拟机里下载docker centos镜像:docker pull centos
-
列出主机本地镜像: # docker image ls
-
运行镜像实例化容器并挂载宿主机目录作为数据卷:docker run -it –mount type=bind,source=/opt/sharefolder,target=/opt/sharefolder imageID bash //容器将共享宿主机的/opt/sharefolder目录以方便数据共享
四)docker配置(在docker container里操作)
-
安装python:https://blog.csdn.net/elija940818/article/details/79238813
-
安装selenium:pip3 install selenium
-
安装firefox:将firefox linux安装包下载至共享目录,然后拷贝至docker根目录下并解压
-
Firefox webdriver下载:https://github.com/mozilla/geckodriver/releases,并将下载的driver放到python的交互式启动目录/usr/bin/下
-
安装HTMLTestRunner.html,请下载支持python 3.x的版本
下载地址:https://download.csdn.net/download/a136332462/9873996
将下载的html放置到$Python/site-packages/目录下
Python3
import sys
sys.path
quit()
cp HTMLTestRunner.py <$Python/site-packages/>
-
虚拟桌面安装:https://blog.51cto.com/taoismli/2173856
-
安装第三方库:
bs4
schedule
xlrd
xlwt
xlutils
chardet
pymssql (
https://docs.microsoft.com/en-us/sql/connect/python/pymssql/step-1-configure-development-environment-for-pymssql-python-development?view=sql-server-2017)
PyMySQL
五) 容器及镜像操作:
https://blog.51cto.com/taoismli/2171108
-
docker container commit
原创文章,作者:3628473679,如若转载,请注明出处:https://blog.ytso.com/tech/opensource/193512.html