vwmaus / model-reproducibility

Research Proposal Master Thesis: Improving reproducibility in Earth Science
GNU General Public License v3.0
0 stars 1 forks source link

ERROR: Service 'webinterface' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder352589508/obj/Docker/publish: no such file or directory #18

Closed vwmaus closed 6 years ago

vwmaus commented 6 years ago

@ptrkrnstnr I get an error running docker-compose up -d. It seems that the env variable ${source:-obj/Docker/publish} points to a nonexistent location. The variable is used by WebInterface/Dockerfile.

$ docker-compose up -d 
Building webinterface
Step 1/6 : FROM microsoft/aspnetcore:2.0
 ---> e0e49def2506
Step 2/6 : ARG source
 ---> Using cache
 ---> 4a8673aa3271
Step 3/6 : WORKDIR /app
 ---> Using cache
 ---> aa5b331d268b
Step 4/6 : EXPOSE 80
 ---> Using cache
 ---> 20b53f22c0b4
Step 5/6 : COPY ${source:-obj/Docker/publish} .
ERROR: Service 'webinterface' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder352589508/obj/Docker/publish: no such file or directory

Thanks!

ptrkrnstnr commented 6 years ago

Hello Victor!

You have to publish the solution file of the webinterface first then the docker-compose works.

So the right workflow must be:

  1. dotnet publish ./webinterface.sln -c Release -o ./obj/Docker/publish
  2. docker-compose up -d

Please let me know if that worked for you 😊

Thank you!

Best, Peter

Von: Victor Maus [mailto:notifications@github.com] Gesendet: Donnerstag, 9. November 2017 08:45 An: vwmaus/model-reproducibility model-reproducibility@noreply.github.com Cc: ptrkrnstnr peter.kronsteiner@gmx.net; Mention mention@noreply.github.com Betreff: [vwmaus/model-reproducibility] ERROR: Service 'webinterface' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder352589508/obj/Docker/publish: no such file or directory (#18)

@ptrkrnstnr https://github.com/ptrkrnstnr I get an error running docker-compose up -d. It seems that the env variable ${source:-obj/Docker/publish} points to a nonexistent location. The variable is used by WebInterface/Dockerfile.

$ docker-compose up -d Building webinterface Step 1/6 : FROM microsoft/aspnetcore:2.0 ---> e0e49def2506 Step 2/6 : ARG source ---> Using cache ---> 4a8673aa3271 Step 3/6 : WORKDIR /app ---> Using cache ---> aa5b331d268b Step 4/6 : EXPOSE 80 ---> Using cache ---> 20b53f22c0b4 Step 5/6 : COPY ${source:-obj/Docker/publish} . ERROR: Service 'webinterface' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder352589508/obj/Docker/publish: no such file or directory

Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vwmaus/model-reproducibility/issues/18 , or mute the thread https://github.com/notifications/unsubscribe-auth/AfT9nwaTpJNCX6y6O_KjWwlA_06MYKvTks5s0q2SgaJpZM4QXjgZ . https://github.com/notifications/beacon/AfT9n_wGvJtNST1St62MT0EYeem1m70Lks5s0q2SgaJpZM4QXjgZ.gif

vwmaus commented 6 years ago

In this case, I need to install dotnet on the host machine. Can we remove this requirement?

ptrkrnstnr commented 6 years ago

Maybe i can include the published version to the repo. Then you dont need to publish the project file.Am 10.11.2017 09:38 schrieb Victor Maus notifications@github.com:In this case, I need to install dotnet on the host machine. Can we remove this requirement?

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

ptrkrnstnr commented 6 years ago

@vwmaus can you try again to run the project, travis ci has build without errors now. The relevant commands can be found in the .travis.yml and the build.sh file in the repository

vwmaus commented 6 years ago

I cannot run the interface using Docker. It seems that the path to the file WebInterface.deps.json is not correctly defined. The file is in ./WebInterface/obj/Docker/publish/WebInterface.deps.json. Any idea?

~/workspace/model-reproducibility$ docker-compose up 
Starting webinterface ... 
Starting webinterface ... done
Attaching to webinterface
webinterface    | Error:
webinterface    |   An assembly specified in the application dependencies manifest (WebInterface.deps.json) was not found:
webinterface    |     package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.1'
webinterface    |     path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll'
webinterface    |   This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
webinterface    |     aspnetcore-store-2.0.3.xml
webinterface exited with code 140
ptrkrnstnr commented 6 years ago

okay, maybe we can solve this problem later when i'm at iiasa. I will arrive at about 2. I will call you again when i'm there.

 

Gesendet: Freitag, 01. Dezember 2017 um 09:56 Uhr Von: "Victor Maus" notifications@github.com An: vwmaus/model-reproducibility model-reproducibility@noreply.github.com Cc: ptrkrnstnr peter.kronsteiner@gmx.net, Mention mention@noreply.github.com Betreff: Re: [vwmaus/model-reproducibility] ERROR: Service 'webinterface' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder352589508/obj/Docker/publish: no such file or directory (#18)

I cannot run the interface using Docker. It seems that the path to the file WebInterface.deps.json is not correctly defined. The file is in ./WebInterface/obj/Docker/publish/WebInterface.deps.json. Any idea?

~/workspace/model-reproducibility$ docker-compose up Starting webinterface ... Starting webinterface ... done Attaching to webinterface webinterface | Error: webinterface | An assembly specified in the application dependencies manifest (WebInterface.deps.json) was not found: webinterface | package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.1' webinterface | path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll' webinterface | This assembly was expected to be in the local runtime store as the application was published using the following target manifest files: webinterface | aspnetcore-store-2.0.3.xml webinterface exited with code 140

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

 

ptrkrnstnr commented 6 years ago

Possible solution: https://stackoverflow.com/questions/43708578/how-to-run-docker-image-produced-by-vs-2017 https://stackoverflow.com/questions/22135897/access-docker-socket-within-container

ptrkrnstnr commented 6 years ago

@vwmaus you can now build/run the image! i found the error and fixed it! (https://github.com/dotnet/coreclr/issues/13542)

I also hit this. For me, it had to do with the use of

in my .csproj when running in an environment that had installed a dotnetcore 2.0 runtime, but not an SDK. See docs on implicit store.

The solution was adding the following to my .csproj:

<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>

Although it should be noted that installing the SDK also worked.

ptrkrnstnr commented 6 years ago

@vwmaus Steps to run docker webinterface:

(https://stackoverflow.com/questions/46456021/dotnet-run-in-docker-container-results-in-inaccessible-url)

vwmaus commented 6 years ago

great job, I will merge the pull.

vwmaus commented 6 years ago

@ptrkrnstnr I still get the error below if I try to set up the web interface using your compiled version. I will need to recompile or make the docker container to do that.

~/workspace/model-reproducibility$ docker-compose up 
Starting webinterface ... 
Starting webinterface ... done
Attaching to webinterface
webinterface    | Error:
webinterface    |   An assembly specified in the application dependencies manifest (WebInterface.deps.json) was not found:
webinterface    |     package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.1'
webinterface    |     path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll'
webinterface    |   This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
webinterface    |     aspnetcore-store-2.0.3.xml
webinterface exited with code 140
ptrkrnstnr commented 6 years ago

@vwmaus can you check if your WebInterface.csproj file contains the following line:

   <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>

That line solved the problem for me and i can now run the application in the cmd...

vwmaus commented 6 years ago

The file is correct, it is set to false

ptrkrnstnr commented 6 years ago

@vwmaus Okay, I have to check that again... This value must be set to false. I tried to build and run the project from the command line and it worked for me. Maybe there are some other things to fix for running it on Linux. I will let you know if I have found another solution...

 

Gesendet: Freitag, 08. Dezember 2017 um 09:29 Uhr Von: "Victor Maus" notifications@github.com An: vwmaus/model-reproducibility model-reproducibility@noreply.github.com Cc: ptrkrnstnr peter.kronsteiner@gmx.net, Mention mention@noreply.github.com Betreff: Re: [vwmaus/model-reproducibility] ERROR: Service 'webinterface' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder352589508/obj/Docker/publish: no such file or directory (#18)

The file is correct, it is set to false

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

 

vwmaus commented 6 years ago

@ptrkrnstnr this is solved in the commit #9aef51b replacing microsoft/aspnetcore-build:1.0-2.0 with dotnet:2.0.0-sdk in docker-compose.ci.build.yml.

ERROR: 
$ docker-compose --file docker-compose.ci.build.yml up 
Creating modelreproducibility_ci-build_1 ... 
Creating modelreproducibility_ci-build_1 ... done
Attaching to modelreproducibility_ci-build_1
ci-build_1  | Did you mean to run dotnet SDK commands? Please install dotnet SDK from: 
ci-build_1  |   http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
modelreproducibility_ci-build_1 exited with code 145

SOLUTION: in docker-compose.ci.build.yml up replace:
-    image: microsoft/aspnetcore-build:1.0-2.0
with:
+    image: microsoft/dotnet:2.0.0-sdk

Setup the interface using Docker compose:

  1. Compile the project docker-compose --file docker-compose.ci.build.yml up
  2. Make the webinterface up docker-compose --file docker-compose.yml up -d

This should work from any OS without installing dotnet in the host machine.

ptrkrnstnr commented 6 years ago

  perfect! thank you for the info!

Gesendet: Montag, 11. Dezember 2017 um 11:00 Uhr Von: "Victor Maus" notifications@github.com An: vwmaus/model-reproducibility model-reproducibility@noreply.github.com Cc: ptrkrnstnr peter.kronsteiner@gmx.net, Mention mention@noreply.github.com Betreff: Re: [vwmaus/model-reproducibility] ERROR: Service 'webinterface' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder352589508/obj/Docker/publish: no such file or directory (#18)

@ptrkrnstnr this is solved in the commit #9aef51b replacing microsoft/aspnetcore-build:1.0-2.0 with dotnet:2.0.0-sdk in docker-compose.ci.build.yml.

ERROR: $ docker-compose --file docker-compose.ci.build.yml up Creating modelreproducibility_ci-build_1 ... Creating modelreproducibility_ci-build_1 ... done Attaching to modelreproducibility_ci-build_1 ci-build_1 | Did you mean to run dotnet SDK commands? Please install dotnet SDK from: ci-build_1 | http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409 modelreproducibility_ci-build_1 exited with code 145

SOLUTION: in docker-compose.ci.build.yml up replace:

Setup the interface using Docker compose:

Compile the project docker-compose --file docker-compose.ci.build.yml up
Make the webinterface up docker-compose --file docker-compose.yml up -d

This should work from any OS without installing dotnet in the host machine.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Â