kaniko
kaniko copied to clipboard
Build Multiple Dockerfile from same build context
I have docker context with multiple Dockerfile in the directory. I have created a configmap of directory containing dockerfiles and mounted it to the /workspace folder in kaniko:
Dockerfile-base-service
Dockerfile-ui-service
Dockerfile-data-service
I am using Kubernetes job to run the kaniko container .
Is it possible to build all of the Dockerfile in single kaniko job/instance?
Using --cleanup flag works for me, but is not the prefered option.
+1, as @ahollmann mentioned currently the best method to have kaniko do this from a single kaniko job instance would be to use the --cleanup flag with each run which will reset the kaniko job to a clean state where it can build the next image.