Closed rlecomte closed 7 years ago
Encountered the same error. It would be worth to mention that in a FAQ at least.
I'm running it on Windows 2016... having the same problem.
docker : "docker build" requires exactly 1 argument(s).
Same here, my projects disk is called "TOSHIBA EXT" so the comand line created is:
docker build -t gregturn/gs-spring-boot-docker:latest /media/slks/TOSHIBA EXT/Proyectos/spring/gs-spring-boot-docker/complete/build/docker
the gradle/docker plugin should escape space (and other special chars in path) like this:
docker build -t gregturn/gs-spring-boot-docker:latest /media/slks/TOSHIBA\ EXT/Proyectos/spring/gs-spring-boot-docker/complete/build/docker
Same problem with a clients' build due to space in jenkins folder name.
Fixed in master. Some test output:
Built from folder with space (C:\repos\git\gs-spring-boot-docker space\complete) using example from spring.io(https://spring.io/guides/gs/spring-boot-docker/)
Plugin version 1.2 FAILURE: Build failed with an exception.
Docker execution failed Command line [docker build -t gregturn/gs-spring-boot-docker:latest C:\repos\git\gs-spring-boot-docker space\complete\build\docker] returned: "docker build" requires exactly 1 argument(s).
Plugin version 1.3-SNAPSHOT (current master) BUILD SUCCESSFUL
Hi,
I encountered an issue when try to build a docker image in my gradle project :
The command "docker build /path/to/dockerfile" doesn't work well if the path contain space => each part of the path will be take like a different argument by the docker daemon.
For example i got this error message with my project name as "multibranch demo" (if a replace space by underscore, it works)
~/workspace_devops/multibranch demo [master|✔] $ gradle clean buildDocker :clean :compileJava :processResources :classes :jar :copyDeps :buildDocker FAILED
FAILURE: Build failed with an exception.