commercialhaskell / commercialhaskell/stack

stack build shows "No directory could be located ..." inside docker container

Open
#2,503 24 comments 1 reaction 0 assignees View on GitHub
needs reproduction type: bug
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

I'm building a project inside a docker container, with this cmd:

```
stack --stack-root /app/build/stack-root/ --work-dir build/work-dir/ build
```

stack shows this output before exit:

```
Populated index cache.
Progress: 4/119No directory could be located matching the supplied path: /tmp/stack178/SHA-1.6.4.2/build

No directory could be located matching the supplied path: /tmp/stack178/ansi-terminal-0.6.2.3/build

No directory could be located matching the supplied path: /tmp/stack178/base-compat-0.9.1/build

No directory could be located matching the supplied path: /tmp/stack178/HUnit-1.3.1.1/build

```

After reading `stack` code, I found about `checkOwnership` function, so I tried this:

```
stack --allow-different-user --stack-root /app/build/stack-root/ --work-dir build/work-dir/ build
```

It seems to work ok (at least it started to compile dependencies).

Is this an expected behaviour?

I'm using this `stack` version inside haskell:7.10.3 docker image:

```
Version 1.1.2, Git revision cebe10e845fed4420b6224d97dcabf20477bbd4b (3646 commits) x86_64 hpack-0.14.0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.