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

Paket restore hangs when used with docker build #3123

Closed
jackmott opened this issue Mar 17, 2018 · 13 comments
Closed

Paket restore hangs when used with docker build #3123

jackmott opened this issue Mar 17, 2018 · 13 comments

Comments

@jackmott
Copy link

Description

paket restore hangs on my project when used in a docker build. It runs very quickly when I run it outside of a docker build. While hung the mono process is pegging 1 core. The last output of paket restore --verbose is "parsing paket.dependencies"

Repro steps

paket.dependencies:

framework >= net45

nuget DotLiquid
nuget FSharp.Data
nuget FsSql
nuget MathNet.Numerics.FSharp
nuget Newtonsoft.Json
nuget Npgsql = 3.1
nuget Octokit
nuget SQLProvider
nuget Suave >= 2.3.0-beta3
nuget Suave.DotLiquid >= 2.3.0-beta3
nuget Suave.Experimental >= 2.3.0-beta3

Dockerfile:

FROM fsharp:latest
ADD . /
WORKDIR /
RUN mono .paket/paket.bootstrapper.exe
RUN mono .paket/paket.exe restore --verbose
RUN ./build.sh
ENTRYPOINT ["mono","/root/AlphaFront/bin/Release/AlphaFront.exe"]

I am running docker build with a private github repo as the context

The repo is private so I am sorry I cannot provide it.

Expected behavior

paket should work

Actual behavior

paket hangs and pegs a cpu core

Known workarounds

none

@forki
Copy link
Member

forki commented Mar 17, 2018 via email

@jackmott
Copy link
Author

@forki any workarounds?

@forki
Copy link
Member

forki commented Mar 18, 2018 via email

@matthid
Copy link
Member

matthid commented Mar 18, 2018

As long as we don’t know how to reproduce or ge it into a debugger be accident. There is not much we can do.
Maybe some http request doesn’t timeout correctly. Or some user message pops up on the ci for some reason...

zakaluka pushed a commit to zakaluka/elmish that referenced this issue Jun 23, 2018
zakaluka pushed a commit to zakaluka/elmish that referenced this issue Jun 23, 2018
@atadi96
Copy link

atadi96 commented Feb 21, 2019

This is rendering me unable to create a repro for an issue with FAKE 5. What can I do in this case? Sorry if this in not the right place to ask but I'm lost.

I've also found that paket restore does not hang when called in a gitlab-runner instance with docker runner.

@forki
Copy link
Member

forki commented Feb 22, 2019

Sorry we still don't know what's going wrong here

@ajuch
Copy link

ajuch commented Nov 26, 2019

I'm having the same behavior with a .net core 3.0 sdk docker image.

paket.dependencies:

source https://api.nuget.org/v3/index.json

storage: none
framework: netcore3.0, netstandard2.0, netstandard2.1
nuget canopy
nuget Selenium.WebDriver.ChromeDriver

Dockerfile:

FROM mcr.microsoft.com/dotnet/core/sdk:3.0 AS build-env
COPY . ./
RUN dotnet tool restore
RUN dotnet paket restore -v

It hangs at:

Step 5/11 : RUN dotnet paket restore -v
 ---> Running in ace15e1382a0
Paket version 5.236.6
found: /paket.dependencies
 - /.paket/Paket.Restore.targets already up-to-date
Parsing /paket.dependencies

So I don't think it's a mono issue...

@forki
Copy link
Member

forki commented Nov 26, 2019

@ajuch cool thanks for the repro. I can actually reproduce it now

@forki
Copy link
Member

forki commented Nov 26, 2019

I added crazy amout of logging and here we are:

image

@forki
Copy link
Member

forki commented Nov 26, 2019

so the problem is in https://github.com/fsprojects/Paket/blob/master/src/Paket.Core/PaketConfigFiles/ProjectFile.fs#L1906

we are scanning all subfolders but inside the docker main folder we seem to run into an issue that we scan the whole file system. So what can we do?

@forki
Copy link
Member

forki commented Nov 26, 2019

this is fixed in 5.238. thanks for the repro

@forki forki closed this as completed in b4baa00 Nov 26, 2019
@ajuch
Copy link

ajuch commented Nov 26, 2019

Thank you @forki! It works!

Ah, I see what I did wrong... I should have put my app into a directory... But the funny thing is that I didn't see the recursive crawling when running strace dotnet paket restore.

But it doesn't matter, now it works like a charm!

@forki
Copy link
Member

forki commented Nov 26, 2019 via email

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

5 participants