Docker is a set of forums as a service product that utilizes the operating system level virtualization to deliver the application packages called containers. It provides different features to simplify the process of building and packaging container images, such as Buildkit features that are included with the Docker daemon.
The outcomes from this guide are:
What is Buildkit in Docker?
Docker buildkit is the default builder for developers on the Docker desktop, and Docker Engine offers new functionality that improves the performance of the build. It is also used for managing and handling complex scenarios, such as detecting and skipping unused build stages while running.
How to Enable/Disable Buildkit in Docker?
To enable/disable buildkit in Docker, check out the provided steps:
-
- Access the Docker Desktop.
- Open its settings through the gear icon.
- Navigate to the Docker Engine
- Modify the value of the buildkit according to true or false.
- Restart the Docker Desktop to apply the changes.
Step 1: Launch Docker Desktop
Initially, open the Docker Desktop with the help of the Startup menu:
Step 2: Access Docker Desktop Settings
Next, click on the cog icon at the top-right side of the main screen and open its settings:
Step 3: Navigate to the Docker Engine
After that, select the Docker Engine option from the left-side menu and move to it:
Step 4: Enable/Disable Buildkit in Docker
Then, inside the builder section change the value of the buildkit according to your choice, such as true for enable and false for disable. After that, hit the Apply & restart button to apply the changes:
Bonus Tip: Developers can also enable or disable the buildkit through the daemon.json file. For that purpose, first, open your folder where the docker is installed and access the .docker folder:
Then, locate the daemon.json file and open it:
After doing so, the daemon.json file will be opened. Now, change the value of the buildkit according to your requirements, save changes, and close it:
That’s all! We have described the easiest way to enable and disable the buildkit in Docker.
Conclusion
To enable and disable the buildkit in Docker, first, open the Docker Desktop and access the setting by clicking on the gear icon at the top of the man screen. Then, open the Docker Engine tab and then, change the value of the buildkit according to the need. After doing so, apply the changes. This blog described the procedure of enabling and disabling the buildkit in Docker.