一般制作docker镜像,都是基于网络同道精心打造的镜像。如果想自己构建一个基础的镜像可以通过此次示例来学习。
说明:
不要忘记命令后的 .
PS C:\WINDOWS\system32> docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEwebapi latest 5462b957a3e2 About an hour ago 161MB
PS E:\My\docker> docker run -i -t --name webapi -p 6002:6001 webapi /bin/sh/ #
说明:
/ # ls #查看容器目录bin etc lib mnt opt publish run srv tmp vardev home media netcore proc root sbin sys usr/ # cd publish #webapi publish 目录/publish # lsGoogle.Protobuf.dll System.Data.SqlClient.dllMicrosoft.Data.Sqlite.dll System.Security.Cryptography.ProtectedData.dllMySql.Data.dll appsettings.Development.jsonNewtonsoft.Json.dll appsettings.jsonNpgsql.dll runtimesOracle.ManagedDataAccess.dll web.configSQLitePCLRaw.batteries_green.dll webapi.deps.jsonSQLitePCLRaw.batteries_v2.dll webapi.dllSQLitePCLRaw.core.dll webapi.exeSQLitePCLRaw.provider.e_sqlite3.dll webapi.pdbSqlSugar.dll webapi.runtimeconfig.jsonSystem.Configuration.ConfigurationManager.dll
说明:
镜像源码:https://github.com/eric-projects/docker-net-core
欢迎打赏