purescript/spago

Error: Remote host not found on `spago build` inside container

ericbmerritt opened this issue · 9 comments

Versions:

  • + spago@0.7.7
  • + purescript@0.12.5

Problem:

I am attempting to run spago build installed via npm inside of a container. When I do that on an empty project after running spago init I get the following error. The same command run on the host (mac osx) works fine. Also running curl https://raw.githubusercontent.com/purescript/package-sets/psc-0.12.5-20190427/src/mkPackage.dhall in the host container works just fine. That seems to indicate that the problem lies in how spago is resolving the host.

$> npx spago build
spago: 
↳ ./packages.dhall
  ↳ https://raw.githubusercontent.com/purescript/package-sets/psc-0.12.5-20190427/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57

Error: Remote host not found


      https://raw.githubusercontent.com/purescript/package-sets/psc-0.12.5-20190427/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57


/iogine/packages.dhall:112:7
f-f commented

Hi @ericbmerritt! Would it be possible to share a Dockerfile that replicates the issue?

Dockerfile and related stuff is located here: https://gitlab.com/metadrift/iogine/tree/feature/migrate-to-purescript/tooling.

You can pull the image directly here: https://gitlab.com/metadrift/iogine/container_registry. The tag is latest

f-f commented

@ericbmerritt I pulled the image (with docker pull registry.gitlab.com/metadrift/iogine/iogine-ci:latest) but it doesn't have npm nor spago installed, in order to be able to replicate I'd need to know how you installed them

Also did you take a look at #192?

f-f commented

Update: I built the image off your branch and installed spago with npm install -g --unsafe-perm spago, and I can replicate your issue, looking into it

f-f commented

@ericbmerritt works for me after apt install netbase as per snoyberg/http-client#292

f-f commented

I think this is solved, so I'll go ahead and mark this as a thing to document for the upcoming 0.8

That solved my problem. Thank you very much.

f-f commented

You're welcome! 🙂

I'll reopen this so we can mark it as fixed once we document it

#199 - may not be in the right form/layout, but hope it helps.