I am trying to build a docker container on my local machine using a Dockerfile stored on a remote host.
Remote machine: added the Dockerfile to ipfs by “ipfs add Dockerfile”
Local machine: using ipfs mount at /ipfs/
While trying to build the Dockerfile, I run into a permission denied error (see below).
$ sudo docker build -t remote_redis_server -f /ipfs/QmYZze6h8psAxJVrXiURtdt8UZZbT3vNLoSR1hQjxMvXcz . unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /ipfs: permission denied
However doing “cat /ipfs/QmYZze6h8psAxJVrXiURtdt8UZZbT3vNLoSR1hQjxMvXcz” has no issues.
What user are you running ipfs as? See the part about user_allow_other:
Otherwise, docker may be tripping up due to the fact that /ipfs is a very special directory (it can’t be listed). Try adding the dockerfile with ipfs add -w Dockerfile. That’ll give you a directory containing the dockerfile. Then, you can run: