.net core项目docker容器化部署
1.环境windows
2.下载docker desktop软件 , 官网https://www.docker.com/products/docker-desktop/
3.desktop安装好,运行,保证是在running状态

运行时候报错需要更新wxl, 执行 wxl --update报错无法连接服务器
解决办法:去https://github.com/microsoft/WSL/releases/latest下载对应msi安装文件,直接安装就好,docker desktop重新启动
4.cmd进.net core工程目录下(这个目录有DockerFile文件),执行 docker build -t devicemanager:linux-latest .

5.建好镜像可以 docker images查看
6.docker save -o devicemanager.tar devicemanager:linux-latest 镜像压缩(ps: 压缩名需要后缀名,被压缩的文件名)

7.传到linux上,导入镜像docker load -i devicemanager.tar
静,静,静

浙公网安备 33010602011771号