What Happens When a Build Runs on a Docker Executor?
- VB Studio checks the Docker image that corresponds with the template configured in the job and
finds whether a build of the image has run before.
If this is the Docker image's first build, it finds a Docker deployment VM to run the image in an executor, and then it downloads the image from the Docker Management VM if the image doesn't already exist in the VM.
If one or more Docker deployment VMs are found, VB Studio selects a Docker deployment VM to run the build in this order:
- If a Docker deployment VM is in the Ready state and has at least one Docker executor that's not running, VB Studio runs the build on it. A Docker deployment VM is full if VB Studio has already deployed the maximum number of executors on that VM.
- If no Docker deployment VMs are in the Ready state, VB Studio starts a Stopped Docker deployment VM and runs the build on one of its Docker executors.
- If all Docker executors of all Docker deployment VMs are running builds, VB Studio waits for a Docker executor to complete its build, and then runs a build on it.
If this is not the Docker image's first build, VB Studio finds the Docker deployment VM that ran the image's Docker executor earlier and uses it to run the build again, unless the Docker deployment VM is full. If all Docker executors of the Docker deployment VM are busy running builds, VB Studio selects another Docker deployment VM to run the build in the above described order.
- VB Studio checks the job's configuration and runs the commands in the specified order.
- After the build is complete, VB Studio copies any generated artifacts to the configured OCI Object Storage bucket.
- The Docker deployment VM waits for some time for any queued builds. If no builds run
during the wait time period, the Docker deployment VM stops.
Before stopping the Docker deployment VM, VB Studio saves the Docker image to the Docker deployment VM's assigned boot volume.