windows下建立netcore控制台程序,然后传送到centos7下的docker容器里运行

2023-04-23,,

1、首先,在window下用vs2017开发netcore控制台项目。

2、把建立好的项目传送到centos7下面的容器里。

docker cp sharefoldersforwindows/  359e:/testnetcore3

运行容器

docker exec -it 359e /bin/bash
cd testnetcore3/
cd sharefoldersforwindows/

查看文件:

-rw-r--r--.  root root  Feb  : HelloWorld.csproj
-rw-r--r--. root root Feb : Program.cs
drwxr-xr-x. root root Feb : bin
drwxr-xr-x. root root Feb : obj

运行

[root@359ed069320e sharefoldersforwindows]# dotnet run

What is your name?
lijie Hello, lijie, on // at :! Press any key to exit...

windows下建立netcore控制台程序,然后传送到centos7下的docker容器里运行的相关教程结束。

《windows下建立netcore控制台程序,然后传送到centos7下的docker容器里运行.doc》

下载本文的Word格式文档,以方便收藏与打印。