Reputation: 304
I am attempting to use Jenkins to create a docker instance with a docker.build() command. The issue is that I have more than one docker file (all of which have unique names) which will be used on different scenarios. Is there a way to use the docker.build command in Jenkins while also specifying which file to use?
api = docker.build("api:Dockerfile-api")
I am attempting to emulate functionality for the command
docker build -t <app-name>-api -f Dockerfile-api .
Upvotes: 0
Views: 42
Reputation: 3089
talking about docker-pipeline-plugin, the second argument the docker.build()
function takes can be docker.build("svc", "-f docker/db/Dockerfile .")
Upvotes: 1