Reputation: 85
I have a jenkins master and able to pull in my code from CodeCommit. I have also set up a jenkins slave and this project has a Dockerfile that builds an image. When I try to execute the shell command,
docker build -f $WORKSPACE/BuildImage/docker/Dockerfile
I get the following error:
08:38:41 + docker build -f /opt/jenkins/workspace/Project/BuildImage/docker/Dockerfile
08:38:41 "docker build" requires exactly 1 argument.
Upvotes: 0
Views: 1575
Reputation: 131
I think you need to provide the path/context. So if it is the working directory
docker build -f $WORKSPACE/BuildImage/docker/Dockerfile .
Be sure to include the period(.) in the command.
Upvotes: 1