# docker for .net6 console **Repository Path**: dongnian/net6-console-for-docker ## Basic Information - **Project Name**: docker for .net6 console - **Description**: 使用docket打包.net6 console镜像 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-17 - **Last Updated**: 2021-11-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## .net6 docker 打包 1, 新建项目 docker new console -f net6 --name net6Console 2,运行 dotnet run 3,加入dockerfile,设置dockerfile为永远复制 4,发布 dotnet publish -c release -o bin/publushed cp dockerfile ./bin/publushed/ 5,生成docker镜像 cd bin/publushed/ docker rmi -f net6console docker build -t net6console . docker images | grep "net6console" 6,运行镜像 docker run -it --rm -p 9101:80 --name net6console net6console Hello, World!