Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application runs in microsoft/dotnet:2.0-sdk container crashes in microsoft/dotnet:2.0-runtime #283

Closed
Hermain opened this issue Aug 18, 2017 · 3 comments

Comments

@Hermain
Copy link

Hermain commented Aug 18, 2017

Steps to reproduce the issue

  1. Dotnet published a basic .NetCore 2.0 web-application.
  2. Put output into a empty directory inside docker image using "FROM microsoft/dotnet:2.0-runtime"
  3. Execute dotnet DataStorage.dll in docker container

Expected behavior

Application starts and listens on the specified port

Actual behavior

  An assembly specified in the application dependencies manifest (DataStorage.deps.json) was not found:
    package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'
    path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
  This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
    aspnetcore-store-2.0.0-linux-x64.xml;aspnetcore-store-2.0.0-osx-x64.xml;aspnetcore-store-2.0.0-win7-x64.xml;aspnetcore-store-2.0.0-win7-x86.xml

Additional information

If I change the dockerfile to use "FROM microsoft/dotnet:2.0-sdk" everything works as expected.

Output of docker version

Client:
 Version:      17.06.0-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:23:31 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.06.0-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:19:04 2017
 OS/Arch:      linux/amd64
 Experimental: false

Output of docker info

Containers: 48
 Running: 2
 Paused: 0
 Stopped: 46
Images: 33
Server Version: 17.06.0-ce
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 172
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active
 NodeID: 1qqo55dlaoiiha8f5f2te32a6
 Is Manager: true
 ClusterID: if94ibodx4i5a57xycjubgd4p
 Managers: 1
 Nodes: 1
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 3
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Root Rotation In Progress: false
 Node Address: 192.168.103.179
 Manager Addresses:
  192.168.103.179:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfb82a876ecc11b5ca0977d1733adbe58599088a
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-89-generic
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 10.8GiB
Name: herm-VirtualBox
ID: UZ4U:3OFR:XEIY:PWCE:D5AX:NCZW:GWML:DMNO:FC2M:3ATY:6XM5:HPNN
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

@natemcmaster
Copy link
Contributor

The ASP.NET Core runtime store is not included in the "runtime only" image. You need to use microsoft/aspnetcore:2.0.0 instead, or opt out of the runtime store trimming.

See also #279 (comment).

cc @dotnet/dotnet-docker-contrib

@Hermain
Copy link
Author

Hermain commented Aug 18, 2017

Thank you very much I used PublishWithAspNetCoreTargetManifest and the problem is solved while having a smaller docker image than microsoft/aspnetcore:2.0.0.

@MichaelSimons
Copy link
Member

Issue has been resolved - closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants