astronomer / ebook-etl-elt

8 stars 5 forks source link

Error: error building, (re)creating or starting [postgres] project containers (possibly Mac and/or colima/lima only) #1

Open hanleybrand opened 1 month ago

hanleybrand commented 1 month ago

When setting up the repo with astro-cli I ran into this error (using an M1 Mac with colima instead of docker):

Error: error building, (re)creating or starting project containers: 
    Error response from daemon: error while creating mount source path '~/dev/ebook-etl-elt/include/postgres': 
        chown ~/dev/ebook-etl-elt/include/postgres: permission denied

tldr:

If you hit that error, try a astro dev restart before digging into the weeds trying to troubleshoot docker volume mount permissions

More context

I did a slight amount of digging after getting the error up top, and it may be related to this rancher-desktop issue.

In that issue discussion someone mentioned that the combo of error while creating mount source path & chown ... permission denied might indicate that the directory ${PWD}/include/postgres isn't created when chown is executed.

Long story short, I checked my repo and the directory had been created, so I tried astro dev restart and airflow started up without issues.

Hopefully the simple restart works for others, because the thicket of weeds otherwise looks like it's been growing a while -- maybe consider trying podman instead (if not actual factual docker) before bushwhacking in 😆), especially as it turns out it's already been discovered the problem affects astro-cli

TJaniF commented 5 days ago

Hi @hanleybrand

Thank you so much for adding this issue, including a fix suggestion and more troubleshooting context!!! I personally don't use colima, so I haven't encountered this. But it sounds like a way you can spend an afternoon 😅

Let me see if I can add the possibility to run this repository in GitHub Codespaces as an alternative for people with Docker/container related issues. :)