右键项目,添加 Docker 支持 Dockerfile 文件内容(路径修改后): #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for fast
# 拉取centos7镜像 docker pull centos:7.6.1810 # 创建并启动centos7容器,运行init程序(必须打开privileged选项,否则将出现“Failed to get D-Bus connection: Operation not permitted”) docker run -d --privileged=true -p 5622:22 --name c