Docker Community Forums

Share and learn in the Docker community.

Docker build failing with: command returned a non-zero code: 255


(Alistairwhite) #1

Expected behavior

New Docker container to be built

Actual behavior

Container fails to be built with the output:

Step 2 : RUN dir c:\Users\
---> Running in e3416e006143
The command 'cmd /S /C dir c:\Users\' returned a non-zero code: 255

Information

Steps to reproduce the behaviour

  1. Use the guide at http://dille.name/blog/2016/06/08/build-ship-run-containers-with-windows-server-2016-tp5/ to download and install docker on a Windows Server 2016 TP 5 server
  2. Create a dockerfile with the following
# escape=`
FROM windowsservercore
RUN dir c:\
  1. Build the dockerfile
  2. Change path in dir command to something different but valid (e.g. C:\Users)
  3. Try rebuilding dockerfile

(Tansgra) #2

I’ve the same problem, I can’t build more than a run step at a time. So I’ve been restarting my server all day long :cry:

I can’t figure what is wrong yet, but I did face this error when windows updates got installed this morning:
https://social.msdn.microsoft.com/Forums/en-US/dfa9ce56-d9c1-408a-82e0-bec38d71a286/fix-for-container-start-failures-update-windows-container-base-os-images?forum=windowscontainers

I was using these instructions as well : https://msdn.microsoft.com/en-us/virtualization/windowscontainers/docker/configure_docker_daemon

version 1.12.0
API v 1.24
kernel 14300.1045.amd64fre.rs1_release_svc.160705-1059


(Robin Ong) #3

I created an issue for this on the github repository:

https://github.com/docker/docker/issues/26693