详情请见:如何安装和开启docker
2、创建Dockerfile/工作目录
—.
—…
—test.txt
$ cd /工作目录 $ vim Dockerfile
进入编辑页面
FROM python:3.8 WORKDIR /flask_app RUN pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple COPY . . CMD ["python3", "--version"]3、使用Dockerfile
$ sudo docker build -t 'linux_python3' ./ $ #root权限 docker 建立 -image名字 '名字' 在宿主机中的copy目录



