Docker Community Forums

Share and learn in the Docker community.

Build fails on remote filesystem

solved

(Carloskar) #1

Update

Apparently when installing Ubuntu Server 18.04 and selecting to install Docker during the installation it installs Docker from the snap-repo (is that what its called?) which is not maintained anymore.
After uninstalling the docker-snap and installing the latest version from the official Docker repos is seems to work as expected, altough I haven’t tried the Get Started example anymore, but it solved other issues.


Hi,
I’m running Ubuntu 18.04 on which I have mounted NFS shared from my FreeBSD NAS.

When I try to build the Get Started, Part 2: Containers app I get the “unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /var/lib/snapd/void/Dockerfile: no such file or directory” error when running from the NFS share, but if I build from the local disk it works.

Building from remote share not working (/nfs/public is the mounting point):

carl-oskar@ubuntu-server  /nfs/public/workspace/docker-tutorial/get-started-part2-containers
$ docker --version
Docker version 17.06.2-ce, build a04f55b

carl-oskar@ubuntu-server  /nfs/public/workspace/docker-tutorial/get-started-part2-containers
$ sha256sum *
7088419fb613b62044658bc4433405ace3a4bdc5f63feb9209509268f1f8da43  app.py
5e9d4fac482ab12a775c4f5516eaf43cbb2e695bad7fc0121b175ffacdec3ee9  Dockerfile
81a4339a0759259b729127c14cf7bf7bcd49d6ae13a0cd9ed3edae0644795c23  requirements.txt

carl-oskar@ubuntu-server  /nfs/public/workspace/docker-tutorial/get-started-part2-containers
$ docker build -t friendlyhello .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /var/lib/snapd/void/Dockerfile: no such file or directory

Building the exact same files from the local disk works:

carl-oskar@ubuntu-server  ~/docker-tutorial/get-started-part2-containers (master)
$ pwd
/home/carl-oskar/docker-tutorial/get-started-part2-containers

carl-oskar@ubuntu-server  ~/docker-tutorial/get-started-part2-containers (master)
$ sha256sum *
7088419fb613b62044658bc4433405ace3a4bdc5f63feb9209509268f1f8da43  app.py
5e9d4fac482ab12a775c4f5516eaf43cbb2e695bad7fc0121b175ffacdec3ee9  Dockerfile
81a4339a0759259b729127c14cf7bf7bcd49d6ae13a0cd9ed3edae0644795c23  requirements.txt

carl-oskar@ubuntu-server  ~/docker-tutorial/get-started-part2-containers (master)
$ docker build -t friendlyhello .
Sending build context to Docker daemon  4.608kB
...
Successfully tagged friendlyhello:latest

Why is it trying to use /var/lib/snapd/void/Dockerfile instead of the correct one? Using ‘-f ./Dockerfile’ is not helping.