fsprojects / IfSharp

F# for Jupyter Notebooks
Other
441 stars 71 forks source link

Unable to build Dockerfile from the repository #154

Closed Zaid-Ajaj closed 6 years ago

Zaid-Ajaj commented 6 years ago

Description

Unable to build Dockerfile from sources

Repro steps

git clone https://github.com/fsprojects/IfSharp.git fsharp-notebook
cd fsharp-notebook
docker build .

Expected behavior

Expected the build to run succesfully

Actual behavior

The build fails see the log below:

# # # # # # # # # # #
# A lot of logs here . . . 
# Omitted for brevity
# # # # # # # # # # #

Step 4 : WORKDIR /
 ---> Running in 5e901e87c9bd
 ---> 456860c5bf15
Removing intermediate container 5e901e87c9bd
Step 5 : RUN git clone https://github.com/fsprojects/IfSharp.git
 ---> Running in 8e138a184673
Cloning into 'IfSharp'...
 ---> da35c8fefb8a
Removing intermediate container 8e138a184673
Step 6 : WORKDIR /IfSharp
 ---> Running in 5b4a7683377a
 ---> cfd773d051e0
Removing intermediate container 5b4a7683377a
Step 7 : RUN ./build.sh
 ---> Running in da0e252fece0
Checking Paket version (downloading latest stable)...
'Github - cached' download failed. If using Mono, you may need to import trusted certificates using the 'mozroots' tool as none are contained by default. Trying fallback download from 'Nuget - cached'.
Checking Paket version (downloading latest stable)...
Unable to look up the latest version online, the cache contains version 0.
Object reference not set to an instance of an object (Nuget - cached)
Error: TrustFailure (The authentication or decryption has failed.) (Github - cached)
The command '/bin/sh -c ./build.sh' returned a non-zero code: 1

Known workarounds

None

Related information

cgravill commented 6 years ago

I'm not sure if anyone has tried using CentOS with this Docker image. I've had it working with Ubuntu previously though I'm not an active user. I believe the Azure Notebook teams build for docker on Ubuntu, you could try it there?

Zaid-Ajaj commented 6 years ago

@cgravill I will try it on Ubunto but this is kind of irrelevant since a docker image should work on any host with docker installed.

cgravill commented 6 years ago

I agree it shouldn't make a difference but I've personally only built the Docker image once, a while back and that was with Ubuntu.

Taking a look at the error it looks like a certificate error possibly with the Paket bootstrapper, which might be easily fixed. There's some more details on this here http://www.mono-project.com/docs/faq/security/#i-imported-the-root-certificate-but-it-still-doesnt-work but I'm not a regular Mono user so not in a position to offer much advice.

We'd be happy to take fixes to make the notebooks work in more places reliably.

frelon commented 6 years ago

I tried solving this in #157, it seems the correct certificates are added in the mono:5.4.0.201 image.

cgravill commented 6 years ago

@frelon that looks great, I was able to build a docker image and run the F# notebook with this. The upgrade to a recent Mono install is also helpful.

Was the switch to root essential? I'm happy to go with that for now as at least it's in a working state.

frelon commented 6 years ago

@cgravill without the allow-root flag the container shutdown directly, but I'll try to change it to not use root instead...

cgravill commented 6 years ago

Thanks! If it causes trouble I can merge it as-is. However, it would be good for safety in depth to avoid running as root - some people may expose this.

frelon commented 6 years ago

@cgravill No problems! Added an ifsharp-user instead in #158

cgravill commented 6 years ago

Excellent, I've merged it in now. @Zaid-Ajaj could you see if it works for you as well please?

cgravill commented 6 years ago

I'm going to close this as fixed, thanks @frelon