GB28181/GB28181.Solution

Cannot run in docker

CrazyCxl opened this issue · 1 comments

step:

  • build GB28181.Service(develop) on Windows
  • copy pro to ubuntu
  • docker build
  • docker run

meet error:
Error: An assembly specified in the application dependencies manifest (GB28181.Service.deps.json) was not found: package: 'Google.Protobuf', version: '3.6.0' path: 'lib/netstandard1.0/Google.Protobuf.dll'

The docker file:

FROM microsoft/dotnet:2.1-runtime

WORKDIR /opt/bin

COPY Build/netcoreapp2.1 /opt/bin 

EXPOSE 5061

EXPOSE 50051

ENTRYPOINT ["dotnet", "GB28181.Service.dll"]

Files in Build/netcoreapp2.1

➜ GB28181.Platform2016 ls Build/netcoreapp2.1 -l
total 2672
-rw-rw-r-- 1 cxl cxl 195 5月 5 19:11 App.config
drwxrwxr-x 2 cxl cxl 4096 8月 16 17:03 Config
-rw-rw-r-- 1 cxl cxl 157184 5月 5 19:11 Consul.dll
-rw-rw-r-- 1 cxl cxl 170 5月 5 19:11 Dockerfile
-rw-rw-r-- 1 cxl cxl 73452 8月 16 17:03 GB28181.Service.deps.json
-rw-rw-r-- 1 cxl cxl 32256 8月 16 17:03 GB28181.Service.dll
-rw-rw-r-- 1 cxl cxl 195 5月 5 19:11 GB28181.Service.dll.config
-rw-rw-r-- 1 cxl cxl 7868 8月 16 17:03 GB28181.Service.pdb
-rw-rw-r-- 1 cxl cxl 236 8月 16 17:03 GB28181.Service.runtimeconfig.dev.json
-rw-rw-r-- 1 cxl cxl 154 8月 16 17:03 GB28181.Service.runtimeconfig.json
-rw-rw-r-- 1 cxl cxl 24064 8月 16 17:03 GrpcAgent.dll
-rw-rw-r-- 1 cxl cxl 6444 8月 16 17:03 GrpcAgent.pdb
-rw-rw-r-- 1 cxl cxl 407552 8月 16 17:03 GrpcProtocol.dll
-rw-rw-r-- 1 cxl cxl 205788 8月 16 17:03 GrpcProtocol.pdb
-rw-rw-r-- 1 cxl cxl 13312 8月 16 17:03 Logger4Net.dll
-rw-rw-r-- 1 cxl cxl 4452 8月 16 17:03 Logger4Net.pdb
-rw-rw-r-- 1 cxl cxl 93696 8月 16 17:03 NATS.Client.dll
-rw-rw-r-- 1 cxl cxl 41880 8月 16 17:03 NATS.Client.pdb
-rw-rw-r-- 1 cxl cxl 185603 8月 16 17:03 NATS.Client.xml
-rw-rw-r-- 1 cxl cxl 1008640 8月 16 17:03 SIPSorcery.28181.dll
-rw-rw-r-- 1 cxl cxl 420848 8月 16 17:03 SIPSorcery.28181.pdb

Run dotnet build before build docker resolved the problem.