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 .

  • How to manage inter-dependant docker containers when moving between or cloning environments
  • Kubernetes Volume mountpath
  • Spring boot connection reset after a few minutes in docker container
  • How to ask docker to pull from private repository when building
  • Docker: Connectivity between Physical Machine - VM -Docker container
  • Leader election in Mesos cluster seems not working
  • 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?

  • Amazon EC2 boot time
  • Can't access service outside of Docker container
  • Meteor build locally or on aws host
  • Docker: listen for .sql changes and re-provision database
  • Sensu-Client inside Docker container
  • Can't bootstrap Docker version since 1.11.x for direct-lvm setup (Kubernetes)
  • 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.