Error checking context is accessible: 'can't stat '.gvfs''. Please check permissions and try again

I created a Dockerfile 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 .

  • docker on OSX slow volumes
  • My docker data-only container is empty
  • Deploying Docker Swarm mode services across multiple failure domains
  • Docker Passenger Dashboard shows MySQL can't connect to socket
  • SSH into staging machine from docker instance using Bitbucket Pipelines
  • Exposing a WSGI app from a Docker container
  • I am recieving this error:

    ” Error checking context is accessible: ‘can’t stat ‘.gvfs”. Please
    check permissions and try again.”

    And docker image is not created. Any suggestions?

  • Docker options for chaining dockerfiles
  • Why does docker mount a file with a numeric value as a directory?
  • Forever monitor fails to run inside a docker container [duplicate]
  • Docker images on different docker versions
  • Runtime.getRuntime().exec on host from inside a Docker process
  • Running a docker container to execute python script with minimal footprint
  • 2 Solutions collect form web for “Error checking context is accessible: 'can't stat '.gvfs''. Please check permissions and try again”

    I faced the same issue while working with boot2docker on Windows 7. However I was able to build it successfully after moving dockerfile outside home directory.

    In my case this issue is occurred because when we call docker build all files searched in working directory and as docker does not run with administrator privilege cannot access to some files and this error generated.

    Solution:

    • Move to directory which all user can accessed (for example: /c)
    • Create new directory (sep)
    • Create Dockerfile in new directory
    • Run build

    commands:

    $ cd /c
    
    $ mkdir sep
    
    $ cd sep
    
    $ touch Dockerfile
    
    # vi Dockerfile
    
    # docker build -t fahsep/debian
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.