mgreenly / dockerimages

A collection of docker images
15 stars 0 forks source link

/home/alpine/.stack/config.yaml: openBinaryFile: permission denied #1

Closed siers closed 7 years ago

siers commented 7 years ago

Hello,

I ran alpine-dockerize and alpine-stack now generates an error:

s|code/haskell/zn master % alpine-stack build
latest: Pulling from mgreenly/alpine-stack
Digest: sha256:c793510ee281c85f3b142f359dfbf2da37ea23848e830719a1863e8510456a81
Status: Image is up to date for mgreenly/alpine-stack:latest
/home/alpine/.stack/config.yaml: openBinaryFile: permission denied (Permission denied)

Do you know why this might be?

P.S. This isn't all too important, but if there are two .cabal files in the root (I had a small copy of parts of project with which I tested a bug.), some variable got assigned the same zn.cabalzn.cabal and some error was shown.

mgreenly commented 7 years ago

I'll take a closer look when I'm not on my phone. But loosely speaking it simply means that the file on your host machine at $HOME/.alpine-stack/config.yaml has different ownership (id:gid) than the process running in the container. That directory gets mapped into the container at /home/alpine/.stack

Most likely the easy fix is to delete $HOME/. alpine-stack on the host machine. It's just a cache and will get recreated with proper permissions.

On May 7, 2017 3:19 PM, "Raitis" notifications@github.com wrote:

Hello,

I ran alpine-dockerize and alpine-stack now generates an error:

s|code/haskell/zn master % alpine-stack build latest: Pulling from mgreenly/alpine-stack Digest: sha256:c793510ee281c85f3b142f359dfbf2da37ea23848e830719a1863e8510456a81 Status: Image is up to date for mgreenly/alpine-stack:latest /home/alpine/.stack/config.yaml: openBinaryFile: permission denied (Permission denied)

Do you know why this might be?

P.S. This isn't all too important, but if there are two .cabal files in the root (I had a small copy of parts of project with which I tested a bug.), some variable got assigned the same zn.cabalzn.cabal and some error was shown.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mgreenly/dockerimages/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAIu2Qm1LxFdebuP8mE3AFDRF-fGhUTks5r3idegaJpZM4NTSJ6 .

mgreenly commented 7 years ago

It turns out the dockerize scripts were using the hard coded user id value of 1000.

I updated them to match the current user when run. It's likely if you're current user id was not 1000 then this was the issue.

After pulling the repository you'll want to make sure and re-copy the contents of the alpine-stack/bin folder to some where on your path so you're using the new verion.

I'm going to mark this closed. If you still have any problems, obviously feel free to create a new.