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 get Shared file system for docker containers running on different hosts?
  • EC2 with Docker and EBS volume, mount EBS volume inside container during init
  • Docker on Mac: No space left on device
  • How do i bind Docker container to a specific external IP address, if i need to allocate many ports?
  • what about the docker image if a container is crashed?
  • Generate random non-overlapping docker binding ports
  • 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?

  • how to add localhost to docker machine
  • Automatically run a script when HBase master Docker container finishes initializing
  • How do I get the container ID of a non-running container?
  • WordPress, Docker and nginx
  • Cannot find Application Insights dependency in docker image after dotnet publish
  • Apache httpcomponent returns java.net.UnknownHostException: Name or service not known
  • 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.