欢迎来到《小5讲堂》,大家好,我是全栈小5。
这是《Docker容器》系列文章,每篇文章将以博主理解的角度展开讲解,
特别是针对知识点的概念进行叙说,大部分文章将会对这些概念进行实际例子验证,以此达到加深对知识点的理解和掌握。
温馨提示:博主能力有限,理解水平有限,若有不对之处望指正!

前言

接着上篇提到的,Docker Desktop目前是没有官方提供的汉化版,它主要是使用英文界面。
所以,本文还是接着来了解下TA界面的基本内容和信息,前几篇文章已经了解了容器、镜像、持久化菜单,
本篇文章将了解Builder菜单内容。

Builder(构建)

基本信息

Build container images and artifacts from source code.(从源代码构建容器镜像和组件构件。)
相关Buils学习地址:https://docs.docker.com/build/?uuid=2AD25E52-6809-4116-B507-059A30B210CB
在这里插入图片描述
Overview of Docker Build
Docker Build is one of Docker Engine’s most used features. Whenever you are creating an image you are using Docker Build. Build is a key part of your software development life cycle allowing you to package and bundle your code and ship it anywhere.
Docker Build is more than a command for building images, and it’s not only about packaging your code. It’s a whole ecosystem of tools and features that support not only common workflow tasks but also provides support for more complex and advanced scenarios.
Docker Build 概述
Docker Build 是 Docker 引擎最常用的功能之一。每当您创建镜像时,都在使用 Docker Build。Build 是您软件开发生命周期的关键部分,让您可以打包和捆绑您的代码,并将其部署到任何地方。
Docker Build 不仅仅是用于构建镜像的命令,也不仅仅是关于打包您的代码。它是一个由工具和功能组成的整体生态系统,不仅支持常见的工作流任务,还为更复杂和高级的场景提供支持。

Builds作用

1、Packaging your software(打包您的软件)
Build and package your application to run it anywhere: locally or in the cloud.
构建和打包您的应用程序,以便在任何地方运行:本地或云端。

2、Multi-stage builds(多阶段构建)
Keep your images small and secure with minimal dependencies.
通过最小化依赖项,使您的镜像小巧且安全。

3、Multi-platform images(多平台镜像)
Build, push, pull, and run images seamlessly on different computer architectures.
在不同的计算机架构上轻松构建、推送、拉取和运行镜像。

4、Build Cloud(构建云)
Orchestrate your builds with Bake.
使用Bake进行构建编排。

5、Architecture(构架法)
Explore BuildKit, the open source build engine.
探索开源构建引擎BuildKit。

6、Build drivers(构建驱动程序)
Configure where and how you run your builds.
配置构建运行的位置和方式。

7、Exporters(导出器)
Export any artifact you like, not just Docker images.
导出任何你想要的构件,不仅限于 Docker 镜像。

8、Build caching(构建缓存)
Avoid unnecessary repetitions of costly operations, such as package installs.
避免不必要的重复执行昂贵的操作,比如软件包安装。

9、Bake(构建缓存)
Orchestrate your builds with Bake.
使用 Bake 来编排您的构建过程。

Builder设置

Selected builder(选定的构建器)
This is the builder that will be used by default when you start a build.
这是在启动构建时默认使用的构建器。

No active builds. Start a build by running. docker build. in your terminal
没有正在进行的构建任务。在终端中运行 “docker build” 来开始一个构建。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
Change selected builder(更改选定的构建器)
This will change your Docker context to: ‘desktop-linux’.
All Docker commands will use the new context from now on.
Do you want to continue?
这将把您的 Docker 上下文更改为:“desktop-linux”。
从现在开始,所有的 Docker 命令都将使用新的上下文。
您想继续吗?在这里插入图片描述

创建Builder

docker buildx create --name=my_builder_name

在这里插入图片描述
在cmd完成上面命令,自动在下面会有一条记录在这里插入图片描述
在这里插入图片描述

相关文章

【Docker】了解Docker Desktop桌面应用程序,TA是如何管理和运行Docker容器(2)
【Docker】了解Docker Desktop桌面应用程序,TA是如何管理和运行Docker容器(1)
【Docker】linux、nginx、容器镜像三者基本概念
【Docker】在Windows下使用Docker Desktop创建nginx容器并访问默认网站
【Docker】在Windows操作系统上安装Docker
【Docker】使用VS创建、运行、打包、部署.net core 6.0 webapi

Docker学习文档中心:https://docs.docker.com/

总结:温故而知新,不同阶段重温知识点,会有不一样的认识和理解,博主将巩固一遍知识点,并以实践方式和大家分享,若能有所帮助和收获,这将是博主最大的创作动力和荣幸。也期待认识更多优秀新老博主。

Logo

一起探索未来云端世界的核心,云原生技术专区带您领略创新、高效和可扩展的云计算解决方案,引领您在数字化时代的成功之路。

更多推荐