Docker introduces Build Cloud for accelerated local development

Docker introduces Build Cloud for accelerated local development

Docker has introduced Build Cloud, a remote build service that runs in the background to speed up local development.

“Build times are getting longer as software is getting more complex,” Chief Product Officer Giri Sreenivas told DevClass. Docker Build Cloud uses cloud resources and a build cache shared across development teams, and the company says build times are typically much reduced despite the need to push code up and then bring the output back down to the local machine. “Some customers have reduced build times from 15-20 minutes down to 110 seconds,” the release claims, though that is likely an edge case.

The service is designed to work smoothly with CI (Continuous Integration) tools such as GitHub actions or GitLab runners. Wherever a Docker Build is invoked, the service can be substituted. “The CI system will push that out of the Docker Build Cloud to complete the build, and then pull the corresponding image back down,” Sreenivas said. The service is also now integrated into the Docker Desktop utility.

In February 2023, with the release of Docker Engine 23, the Docker Build command became an alias to buildx, an extended version using Docker BuildKit. Switching to Cloud Build is a matter of configuring BuildKit to use the remote service. This is then used for debug builds as well as release builds, so the service may be called frequently.

The developer’s other tools, such as IDE or editor, and Docker Desktop, remain local.  Sreenivas told us that most companies will not adopt remote development. “Their existing workflows are broken with the types of tools that are required for certain cloud-only solutions. There are trade-offs for security, particularly for companies in highly regulated industries, and there’s always the challenge of the offline/online experience,” he said.

Docker Build Cloud

What is the specification of the remote build server or servers? “There’s a default configuration that we provide, but we are able to modify that size depending on the needs of the customer,” said Sreenivas.

Since developers often have high-end machines, is remote build always desirable? “It depends on the type of build,” Sreenivas said. “Some builds are more CPU-bound and others are more IO-bound. In builds that are very IO-bound there is a tremendous performance benefit in leveraging the cache, because they’re not having to recompute and they’re able to take advantage of high-speed storage. But we do see performance benefits across the board, particularly where we’re having to cross-compile across architectures.”

That said, Sreenivas acknowledged there are cases where local build is faster. “When builds are very short, maybe 30 to 90 seconds, it’s much faster to complete it locally than to go through this loop,” he said. Switching between the two is “one command line execution to swap,” Sreenivas added.

Why are build times getting longer? “Applications are growing more complex, they’re taking on more dependencies, lines of code are getting larger, let alone the organizational aspect of them,” Sreenivas said. Further, migration from monolithic applications to microservices is adding complexity, despite the notion of building just one small piece at a time. “There are subsets of the application that can be more easily developed locally, but when it come to testing and deploying that service against the entire cluster, sometimes you have to through the entire CI pipeline to get that full deployment,” he told DevClass.

All Docker plans have a limited allocation of Build Cloud minutes, beyond which it is billed at $5.00 for 200 minutes per seat/month, and additional minutes at $0.05 per minute.