Skip to content

some issues with dnx when run with microsoft/aspnet docker image #1213

@YouthLab

Description

@YouthLab

Hi ,I have a docker file just like this:

FROM microsoft/aspnet:1.0.0-rc1-update1
COPY . /app
WORKDIR /app
RUN ["dnu", "restore"]

EXPOSE 5016
ENTRYPOINT ["dnx", "-p", "Floret-API-Dockerized", "web"]

,
and when i build a image with this,and run the image that i build, i meet those error below (get from "docker logs "):

Application startup exception: System.IO.DirectoryNotFoundException: Could not find a part of the path "/app/Floret-Sink.Infrastructure/obj/Debug/Floret-Sink.Infrastructure.dll".
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0 
  at Microsoft.Dnx.Compilation.CSharp.MetadataReferenceExtensions.CreateAssemblyMetadata (IMetadataFileReference fileReference) [0x00000] in <filename unknown>:0 
  at Microsoft.Dnx.Compilation.CSharp.RoslynCompiler+<>c__DisplayClass7_0.<.ctor>b__1 (Microsoft.Dnx.Compilation.Caching.CacheContext ctx) [0x00000] in <filename unknown>:0 
  at Microsoft.Dnx.Compilation.Caching.CacheExtensions+<>c__DisplayClass0_0`1[Microsoft.CodeAnalysis.AssemblyMetadata].<Get>b__0 (Microsoft.Dnx.Compilation.Caching.CacheContext ctx) [0x00000] in <filename unknown>:0 
  at Microsoft.Dnx.Compilation.Caching.Cache.CreateEntry (System.Object k, System.Func`2 acquire) [0x00000] in <filename unknown>:0 
  at Microsoft.Dnx.Compilation.Caching.Cache+<>c__DisplayClass5_0.<AddEntry>b__0 () [0x00000] in <filename unknown>:0 
  at System.Lazy`1[Microsoft.Dnx.Compilation.Caching.Cache+CacheEntry].CreateValue () [0x00000] in <filename unknown>:0 
Hosting environment: Production
Now listening on: http://*:5016
Application started. Press Ctrl+C to shut down.

Can anyone tell me what should i do?

Hope for your reply soon, thank you .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions