Docker Community Forums

Share and learn in the Docker community.

Docker build failed - Error checking context

Hi

Made clean Docker toolbox installation on my Windows 7 Professional computer.
Can’t build an images, see the error code below.

What is the workaround?

$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
jboss/wildfly latest f8bfa182b225 7 days ago 580.3 MB

$ cat Dockerfile
FROM jboss/wildfly
RUN /opt/jboss/wildfly/bin/add-user.sh admin elvis --silent

$ docker build -t jboss/wildfly-admin .
Error checking context: ‘can’t stat ‘\?\C:\Users\fbodin\AppData\Local\Application Data’’.

$ docker info
Containers: 4
Running: 0
Paused: 0
Stopped: 4
Images: 3
Server Version: 1.11.1
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 63
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge null host
Kernel Version: 4.4.8-boot2docker
Operating System: Boot2Docker 1.11.1 (TCL 7.0); HEAD : 7954f54 - Wed Apr 27 16:36:45 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 995.9 MiB
Name: default
ID: XTZG:UMCB:S7XF:ICGD:BZNL:FGAV:4BU4:BUPI:QT6E:CFHU:FENX:BGOU
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug mode (client): false
Debug mode (server): true
File Descriptors: 12
Goroutines: 29
System Time: 2016-05-25T17:59:20.667766893Z
EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox

Operating system
Windows 7 Professional

$ env
HOMEPATH=\Users\fbodin
APPDATA=C:\Users\fbodin\AppData\Roaming
MANPATH=/mingw64/share/man:/usr/local/man:/usr/share/man:/usr/man:/share/man:/mingw64/share/man:/usr/local/man:/usr/share/man:/usr/man:/share/man:
ProgramW6432=C:\Program Files
HOSTNAME=fbodin-PC
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
TERM=cygwin
SHELL=/usr/bin/bash
WINDIR=C:\Windows
TMPDIR=/tmp
DOCKER_HOST=tcp://192.168.99.100:2376
PUBLIC=C:\Users\Public
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
USERDOMAIN=fbodin-PC
ALLUSERSPROFILE=C:\ProgramData
OS=Windows_NT
windows_tracing_flags=3
!::=::
windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log
COMMONPROGRAMFILES=C:\Program Files\Common Files
TEMP=/tmp
DOCKER_MACHINE_NAME=default
USERNAME=fbodin
DOCKER_TLS_VERIFY=1
PROCESSOR_LEVEL=6
ProgramFiles(x86)=C:\Program Files (x86)
EXEPATH=C:\Program Files\Git\bin
PATH=/c/Users/fbodin/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Users/fbodin/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/fbodin/bin:/c/ProgramData/Oracle/Java/ja
vapath:/c/PROGRAM FILES/BROADCOM/BROADCOM 802.11 NETWORK ADAPTER/DRIVER:/c/PROGRAM FILES (X86)/INTEL/ICLS CLIENT:/c/PROGRAM FILES/INTEL/ICLS CLIENT:/c/Windows/SYSTEM32:/c/Windows:/c/Windows/SYSTEM32/W
BEM:/c/Windows/SYSTEM32/WINDOWSPOWERSHELL/V1.0:/c/PROGRAM FILES/INTEL/INTEL® MANAGEMENT ENGINE COMPONENTS/DAL:/c/PROGRAM FILES (X86)/INTEL/INTEL® MANAGEMENT ENGINE COMPONENTS/DAL:/c/PROGRAM FILES/
INTEL/INTEL® MANAGEMENT ENGINE COMPONENTS/IPT:/c/PROGRAM FILES (X86)/INTEL/INTEL® MANAGEMENT ENGINE COMPONENTS/IPT:/c/Program Files/WIDCOMM/Bluetooth Software:/c/Program Files/WIDCOMM/Bluetooth So
ftware/syswow64:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files (x86)/Skype/Phone:/d/devtools/putty:/d/devtools/Docker Toolbox:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/bin/
vendor_perl:/usr/bin/core_perl
DOCKER_TOOLBOX_INSTALL_PATH=D:\devtools\Docker Toolbox
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules
FP_NO_HOST_CHECK=NO
SYSTEMDRIVE=C:
PWD=/c/Users/fbodin
USERPROFILE=C:\Users\fbodin
LANG=en_US.UTF-8
LOGONSERVER=\FBODIN-PC
PS1=[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007]\n[\033[32m]\u@\h [\033[35m]$MSYSTEM [\033[33m]\w[\033[36m]__git_ps1[\033[0m]\n$
CommonProgramW6432=C:\Program Files\Common Files
LOCALAPPDATA=C:\Users\fbodin\AppData\Local
PROCESSOR_ARCHITECTURE=AMD64
SSH_ASKPASS=/mingw64/libexec/git-core/git-gui–askpass
ProgramData=C:\ProgramData
HOME=/c/Users/fbodin
SHLVL=1
DOCKER_CERT_PATH=C:\Users\fbodin.docker\machine\machines\default
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
HOMEDRIVE=C:
PLINK_PROTOCOL=ssh
VBOX_MSI_INSTALL_PATH=D:\devtools\vbox
COMSPEC=C:\Windows\system32\cmd.exe
MSYSTEM=MINGW64
SYSTEMROOT=C:\Windows
TMP=/tmp
PROCESSOR_REVISION=3c03
PRINTER=Canon MG7100 series Printer
PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
PROGRAMFILES=C:\Program Files
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:/share/info:/usr/local/info:/usr/share/info:/usr/info:/share/info:
ACLOCAL_PATH=/mingw64/share/aclocal:/usr/share/aclocal
DISPLAY=needs-to-be-defined
NUMBER_OF_PROCESSORS=8
asl.log=Destination=file
SESSIONNAME=Console
COMPUTERNAME=FBODIN-PC
BASH_FUNC_docker%%=() { MSYS_NO_PATHCONV=1 docker.exe “$@”
}
_=/usr/bin/env

Has similar issue been referred?

Not sure you have resolved this but I got the same error today and was able to resolve it. Problem seems to be the sub directory with spaces (C:\Users\fbodin\AppData\Local\Application Data). When I issue the command from a directory with no sub directory with spaces it worked

I got the same error on my Mac when I ran it from my home directory. I wanted to check if the path is the problem. I moved the Dockerfile to a new directory I just created for this purpose and ran it from there. It ran without any hiccups.

My 2 cents.

1 Like

Hi All,
i was also getting the same error, as suggested moved my docker file to another location. It worked fine after that

1 Like

Thanks issue got resolved…

Remove both files:

  • .bash_history
  • .python_history

& restart the command: