1、windows用户下载Desktop Docker
2、编写dockerfile,这里命名为dockerfile_env2
# from基础镜像,如FROM python:3.7.2 FROM tisasrec_env:1.0 WORKDIR /felton_environment COPY requirements.txt requirements.txt RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple # 镜像源 COPY sources.list.txt /etc/apt/sources.list RUN apt-get update # 安装 openssh-server RUN apt-get -y install openssh-server
requirements.txt类似下方
tensorflow==1.15 certifi==2022.5.18.1 joblib==1.1.0 numpy==1.19.5 tqdm==4.64.0 typing_extensions==4.2.0
3、依次运行docker命令
docker build -f dockerfile_env2 -t tisasrec_enviroment:1.1 . docker images查看现有镜像 重新tag镜像docker tag tisasrec_enviroment:1.1 192.168.25.31/guangz017/tisasrec_enviroment:1.1 docker push 192.168.25.31/guangz017/tisasrec_enviroment:1.1



