Docker Community Forums

Share and learn in the Docker community.

Is there a way to build a docker image while I am building a docker image?

Google’s cloud build is weird to me. It has the yaml way, the json way, and the docker way. The yaml way is every command is a docker image and command to do something(which just seems very weird). I really really wanted to just have google build execute a docker image of mine to do the entire build. Instead, I could only figure out how to do things ‘during’ an image build of docker and in so resulted in this SO post of all the details…

Any ideas?


Create an image from an existing container: In this case, you start with an existing image, customize it with the changes you want, then build a new image from it.
Use a Dockerfile: In this case, you use a file of instructions — the Dockerfile — to specify the base image and the changes you want to make to it.