AmpersandTarski / Ampersand

Build database applications faster than anyone else, and keep your data pollution free as a bonus.
http://ampersandtarski.github.io/
GNU General Public License v3.0
40 stars 8 forks source link

Error in Dockerfile: stack not found #1291

Closed stefjoosten closed 2 years ago

stefjoosten commented 2 years ago

What happened

I was building a local version of Ampersand on commit 002152cb8:

sjo00577@BA92-VYF9TXMD9G Ampersand % pwd            
/Users/sjo00577/git/Ampersand
sjo00577@BA92-VYF9TXMD9G Ampersand % git status     
On branch main
Your branch is up to date with 'origin/main'.
sjo00577@BA92-VYF9TXMD9G Ampersand % git rev-parse --short HEAD
002152cb8
sjo00577@BA92-VYF9TXMD9G Ampersand % docker build .
[+] Building 0.7s (14/18)                                                                                                                                                                                                              
 => [internal] load build definition from Dockerfile                                                                                                                                                                              0.0s
 => => transferring dockerfile: 37B                                                                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                 0.0s
 => => transferring context: 34B                                                                                                                                                                                                  0.0s
 => [internal] load metadata for docker.io/library/ubuntu:latest                                                                                                                                                                  0.3s
 => [internal] load metadata for docker.io/library/haskell:8.10.7                                                                                                                                                                 0.3s
 => [buildstage 1/9] FROM docker.io/library/haskell:8.10.7@sha256:aaa408ad7e7eff6cd76c39feae223db7ba3550b937e833e78958478334fc9afe                                                                                                0.0s
 => [stage-1 1/4] FROM docker.io/library/ubuntu@sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d                                                                                                           0.0s
 => [internal] load build context                                                                                                                                                                                                 0.1s
 => => transferring context: 222.94kB                                                                                                                                                                                             0.1s
 => CACHED [stage-1 2/4] RUN apt-get update && apt-get install -y graphviz                                                                                                                                                        0.0s
 => CACHED [stage-1 3/4] WORKDIR /scripts                                                                                                                                                                                         0.0s
 => CACHED [buildstage 2/9] RUN mkdir /opt/ampersand                                                                                                                                                                              0.0s
 => CACHED [buildstage 3/9] WORKDIR /opt/ampersand                                                                                                                                                                                0.0s
 => CACHED [buildstage 4/9] RUN apt-get update &&     apt-get upgrade -y &&     apt-get install -y git                                                                                                                            0.0s
 => [buildstage 5/9] COPY stack.yaml package.yaml /opt/ampersand/                                                                                                                                                                 0.0s
 => ERROR [buildstage 6/9] RUN stack build --dependencies-only                                                                                                                                                                    0.2s
------                                                                                                                                                                                                                                 
 > [buildstage 6/9] RUN stack build --dependencies-only:
#14 0.200 /bin/sh: 1: stack: not found
------
executor failed running [/bin/sh -c stack build --dependencies-only]: exit code: 127
sjo00577@BA92-VYF9TXMD9G Ampersand % 

What has happened that stack is no longer found? I have tried a previous commit on the main branch, but with the same result...

What I expected

I expected this docker job to run smoothly till the end.

hanjoosten commented 2 years ago

I am experiencing similar errors. Something has changed, but I haven't got my finger behind it yet.

Michiel-s commented 2 years ago

Still the case? Or can we close this one @hanjoosten

hanjoosten commented 2 years ago

For the development we now have a good working .devcontainer. The docker image itself builds through the github workflow. Both work well, so this issue can be closed.