Error checking context is available: 'can not stat'.gvfs''. Check permissions and try again.

I created a Docker file in my root.

FROM ubuntu:12.04 MAINTAINER Bhim Singh < bhim3003@gmail.com > RUN apt-get y install java CMD echo hello 

then I tried to run this command: sudo docker build -t bhim3003/myjava .

I get this error:

"Error checking context is available: 'stat_.gvfs cannot.' 'Check permissions and try again."

And the docker image is not created. Any suggestions?

+5
source share
2 answers

I encountered the same problem when working with boot2docker on Windows 7. However, I managed to create it successfully after moving the dockerfile outside the home directory.

+10
source

In my case, this problem occurs because when we call the docker assembly, all the files found in the working directory, and since the docker does not start as administrator, does not have access to some files and this error is generated.

Decision:

  • Move to a directory that can be accessed by any user (for example: / c)
  • Create a new directory (sep)
  • Create Docker File in New Directory
  • Run assembly

commands:

 $ cd /c $ mkdir sep $ cd sep $ touch Dockerfile # vi Dockerfile # docker build -t fahsep/debian 
0
source

Source: https://habr.com/ru/post/1200815/


All Articles