当前位置: 首页 > news >正文

基于Windows11的DockerDesktop安装和布署方法简介

基于Windows11的DockerDesktop安装和布署方法简介
一、下载安装Docker
docker 下载地址
https://www.docker.com/

Download Docker Desktop
选择Download for Winodws AMD64下载Docker Desktop Installer.exe
双点击 Docker Desktop Installer.exe 进行安装

测试Docker安装是否成功:命令行中输入docker
显示如下所示:表示安装成功

C:\Users\Administrator>dockerUsage:  docker [OPTIONS] COMMANDA self-sufficient runtime for containersCommon Commands:run         Create and run a new container from an imageexec        Execute a command in a running containerps          List containersbuild       Build an image from a Dockerfilepull        Download an image from a registrypush        Upload an image to a registryimages      List imageslogin       Authenticate to a registrylogout      Log out from a registrysearch      Search Docker Hub for imagesversion     Show the Docker version informationinfo        Display system-wide informationManagement Commands:ai*         Ask Gordon - Docker Agentbuilder     Manage buildsbuildx*     Docker Buildxcompose*    Docker Composecontainer   Manage containerscontext     Manage contextsdebug*      Get a shell into any image or containerdesktop*    Docker Desktop commands (Beta)dev*        Docker Dev Environmentsextension*  Manages Docker extensionsfeedback*   Provide feedback, right in your terminal!image       Manage imagesinit*       Creates Docker-related starter files for your projectmanifest    Manage Docker image manifests and manifest listsnetwork     Manage networksplugin      Manage pluginssbom*       View the packaged-based Software Bill Of Materials (SBOM) for an imagescout*      Docker Scoutsystem      Manage Dockertrust       Manage trust on Docker imagesvolume      Manage volumesSwarm Commands:swarm       Manage SwarmCommands:attach      Attach local standard input, output, and error streams to a running containercommit      Create a new image from a container's changescp          Copy files/folders between a container and the local filesystemcreate      Create a new containerdiff        Inspect changes to files or directories on a container's filesystemevents      Get real time events from the serverexport      Export a container's filesystem as a tar archivehistory     Show the history of an imageimport      Import the contents from a tarball to create a filesystem imageinspect     Return low-level information on Docker objectskill        Kill one or more running containersload        Load an image from a tar archive or STDINlogs        Fetch the logs of a containerpause       Pause all processes within one or more containersport        List port mappings or a specific mapping for the containerrename      Rename a containerrestart     Restart one or more containersrm          Remove one or more containersrmi         Remove one or more imagessave        Save one or more images to a tar archive (streamed to STDOUT by default)start       Start one or more stopped containersstats       Display a live stream of container(s) resource usage statisticsstop        Stop one or more running containerstag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGEtop         Display the running processes of a containerunpause     Unpause all processes within one or more containersupdate      Update configuration of one or more containerswait        Block until one or more containers stop, then print their exit codesGlobal Options:--config string      Location of client config files (default"C:\\Users\\Administrator\\.docker")-c, --context string     Name of the context to use to connect to thedaemon (overrides DOCKER_HOST env var anddefault context set with "docker context use")-D, --debug              Enable debug mode-H, --host list          Daemon socket to connect to-l, --log-level string   Set the logging level ("debug", "info","warn", "error", "fatal") (default "info")--tls                Use TLS; implied by --tlsverify--tlscacert string   Trust certs signed only by this CA (default"C:\\Users\\Administrator\\.docker\\ca.pem")--tlscert string     Path to TLS certificate file (default"C:\\Users\\Administrator\\.docker\\cert.pem")--tlskey string      Path to TLS key file (default"C:\\Users\\Administrator\\.docker\\key.pem")--tlsverify          Use TLS and verify the remote-v, --version            Print version information and quitRun 'docker COMMAND --help' for more information on a command.For more help on how to use Docker, head to https://docs.docker.com/go/guides/C:\Users\Administrator>

二、配置Docker
打开Docker 应用时 不需要注册,直接跳过。
国外docker镜像 可能无法拉取,需在Docker中做DockerEngine的相关配置:
设置/Docker Engine中添加如下代码:

"experimental": false, 后加上如下Docker镜像地址,建议直接复制
"registry-mirrors": ["https://docker.m.daocloud.io/","https://huecker.io/","https://dockerhub.timeweb.cloud","https://noohub.ru/","https://dockerproxy.com","https://docker.mirrors.ustc.edu.cn","https://docker.nju.edu.cn","https://xx4bwyg2.mirror.aliyuncs.com","http://f1361db2.m.daocloud.io","https://registry.docker-cn.com","http://hub-mirror.c.163.com"
]
配置修改后,点击 Apply&restart 保存并重启Docker

全部配置参数如下所示:

{"builder": {"gc": {"defaultKeepStorage": "20GB","enabled": true}},"experimental": false,"registry-mirrors": ["https://docker.m.daocloud.io/","https://huecker.io/","https://dockerhub.timeweb.cloud","https://noohub.ru/","https://dockerproxy.com","https://docker.mirrors.ustc.edu.cn","https://docker.nju.edu.cn","https://xx4bwyg2.mirror.aliyuncs.com","http://f1361db2.m.daocloud.io","https://registry.docker-cn.com","http://hub-mirror.c.163.com"]}

三、启动Docker服务
启动前置条件:

BIOS设置
启用Intel Virtualization Techndogx
Intel VMX/AMD SVM等

控制面板设置/启用Window功能
Hyper-V
Virtual Machine Platform
Windows Subsystem for Linux
启用HV主机服务
Windows启动时启用了虚拟机监控程序

去掉HOSTS文件只读属性

重新关闭和启动hyper-v,来解决解决hyper-v导致docker无法启动问题
用管理员身份打开cmd,执行一下命令

1.禁用hyper-v
bcdedit /set hypervisorlaunchtype off

bcdedit /set hypervisorlaunchtype off 

2.重新启用hyper-v
bcdedit /set hypervisorlaunchtype auto

bcdedit /set hypervisorlaunchtype auto

解决WSL错误问题:

wsl --shutdown
wsl
wsl --update
wsl.exe --install --no-distribution

然后重启电脑
点击Apply 和restart功能
restart功能在界面底部Engine runing 后面的三个坚点下拉菜单中点击运行
在这里插入图片描述
本blog地址:https://blog.csdn.net/hsg77

相关文章:

基于Windows11的DockerDesktop安装和布署方法简介

基于Windows11的DockerDesktop安装和布署方法简介 一、下载安装Docker docker 下载地址 https://www.docker.com/ Download Docker Desktop 选择Download for Winodws AMD64下载Docker Desktop Installer.exe 双点击 Docker Desktop Installer.exe 进行安装 测试Docker安装是…...

ffmpeg源码编译支持cuda

1.安装cuda CUDA Toolkit 11.3 Downloads | NVIDIA Developer 在选择组件的时候,将CUDA中的Nsight VSE和Visual Studio Integration取消勾选 不然会安装失败 2.编译ffmpeg 把cuda编译宏定义开启,再编译avcodec 3.编译livavutil报错struct "Cuda…...

动漫短剧开发公司,短剧小程序搭建快速上线

在当今快节奏的生活里,人们的娱乐方式愈发多元,而动漫短剧作为新兴娱乐形式,正以独特魅力迅速崛起,成为娱乐市场的耀眼新星。近年来,动漫短剧市场呈爆发式增长,吸引众多创作者与观众目光。 从市场规模来看…...

《2025软件测试工程师面试》接口测试篇

基础概念 什么是接口测试? 接口测试是测试系统组件间接口的一种测试,主要用于检测外部系统和内部系统之间以及各个子系统之间的交互点。测试的重点是检查数据的交换、传递和控制管理的过程,以及系统间的相互逻辑依赖关系等。 接口测试的优势是什么? 接口测试具有规范性与扩…...

嵌入式学习第二十三天--网络及TCP

进程通信的方式: 同一主机 传统 system V 不同主机 网络 --- 解决不同主机间 的进程间通信 网络 (通信) //1.物理层面 --- 联通(通路) //卫星 2G 3G 4G 5G 星链 (千帆) //2.逻辑层面 --- 通路(软件) MAC os LINUX …...

Elasticsearch:解锁深度匹配,运用Elasticsearch DSL构建闪电般的高效模糊搜索体验

目录 Elasticsearch查询分类 叶子查询 全文检索查询 match查询 multi_match查询 精确查询 term查询 range查询 复杂查询 bool查询简单应用 bool查询实现排序和分页 bool查询实现高亮 场景分析 问题思考 解决方案 search_after方案(推荐) point in time方案 方案…...

SQLAlchemy系列教程:基本数据类型及自定义类型

在SQLAlchemy、Python SQL工具包和ORM中定义模型时,理解基本数据类型至关重要。本教程提供了在SQLAlchemy模型中有效使用内置基本类型的指南。 SQLAlchemy中的基本类型 SQLAlchemy支持一组与SQL数据库类型一致的基本数据类型。SQLAlchemy中的每种类型都为各种SQL类…...

【Wireshark 02】抓包过滤方法

一、官方教程 Wireshark 官网文档 : Wireshark User’s Guide 二、显示过滤器 2.1、 “数据包列表”窗格的弹出过滤菜单 例如,源ip地址作为过滤选项,右击源ip->prepare as filter-> 选中 点击选中完,显示过滤器&#…...

ES怎么查询大于10000条数据

在Elasticsearch(ES)中,默认情况下,查询结果的最大返回条数是10,000条。如果你需要查询超过10,000条数据,可以通过以下几种方式来实现: 1. 使用 scroll API scroll API 适用于需要处理大量数据的场景&…...

《几何原本》命题I.8

《几何原本》命题I.8 如果两个三角形有三边对应相等,那么这两个三角形的所有对应角亦相等。 若 A B D E , A C D F , B C E F ABDE,ACDF,BCEF ABDE,ACDF,BCEF 将 △ A B C \triangle ABC △ABC 平移至 △ D E F \triangle DEF △DEF,使 B C BC …...

课程2. 机器学习方法论

课程2. 机器学习方法论 训练算法并评估其质量将样本分成训练和测试。分层 交叉验证方法sklearn 接口算法模型训练模型的应用质量评估 数据预处理标准缩放Violinplot 数据集使用模型Pipeline 在上一讲中,我们讨论了机器学习专家面临的挑战。无论解决的问题类型和解决…...

ioday2----->标准io函数

思维导图: 练习: 1将当前的时间写入到time. txt的文件中,如果ctrlc退出之后,在再次执行支持断点续写 1.2022-04-26 19:10:20 2.2022-04-26 19:10:21 3.2022-04-26 19:10:22 //按下ctrlc停止,再次执行程序 4.2022…...

SQL注入练习场:PHPStudy+SQLI-LABS靶场搭建教程(零基础友好版)

注意:文中涉及演示均为模拟测试,切勿用于真实环境,任何未授权测试都是违法行为! 一、环境准备 下载PHPStudy 官网下载地址:https://www.xp.cn/php-study(选择Windows版) 安装时建议选择自定…...

【笔记ing】python

1 Python基础概念及环境搭建 1.1 python简介及发展史 之父Guido van Rossum。ABC语言的替代品。Python提供了高效的数据结构,还能简单有效地面向对象编程。Python语法和动态类型,以及解释性语言的本质,使之成为多数平台上写脚本和快速开发应…...

DFT之SSN架构

SSN(Streaming Scan Network)架构在DFT(设计可测试性)中的应用是一种先进的设计测试解决方案,旨在应对现代大规模片上系统(SoC)设计中的复杂测试挑战。以下是对SSN架构在DFT中应用的详细分析&am…...

四十二:VSCODE打开新文件覆盖上一个文件窗口问题

VSCODE打开新文件覆盖上一个文件窗口问题_vscode enablepreview-CSDN博客...

JMeter 引入 JAR 包的几种方法

JMeter 支持加载外部 JAR 文件,用于: 扩展 JMeter 功能使用 Java 代码(BeanShell / JSR223)连接数据库 / 解析 Excel / 读取 CSV 📌 1. JMeter 引入 JAR 包的方式 ✅ 方式 1:将 JAR 放入 lib/ 或 lib/ext…...

记一次ScopeSentry搭建

介绍 Scope Sentry是一款具有资产测绘、子域名枚举、信息泄露检测、漏洞扫描、目录扫描、子域名接管、爬虫、页面监控功能的工具,通过构建多个节点,自由选择节点运行扫描任务。当出现新漏洞时可以快速排查关注资产是否存在相关组件。 目前功能 插件系…...

C语言_数据结构总结1:静态分配方式的顺序表

纯C语言代码,不涉及C 1. 初始化 #define MaxSize 50 typedef int ElemType; typedef struct SQList { ElemType data[MaxSize]; //定义一个数组存放顺序表元素 int length; //顺序表当前的长度(元素个数…...

C语言--简单排序算法(冒泡、选择、插入)

实现三种简单的排序算法 文章目录 冒泡排序改进改进2 选择排序插入排序执行结果 冒泡排序 每次外层循环&#xff0c;排出一个最大值 void bubbleSort(int arr[], int len) {for (int i 0; i < len - 1; i) {for (int j 0; j < len - i - 1; j) {if (arr[j] > arr[…...

三维GIS开发cesium智慧地铁教程(5)Cesium相机控制

一、环境搭建 <script src"../cesium1.99/Build/Cesium/Cesium.js"></script> <link rel"stylesheet" href"../cesium1.99/Build/Cesium/Widgets/widgets.css"> 关键配置点&#xff1a; 路径验证&#xff1a;确保相对路径.…...

在HarmonyOS ArkTS ArkUI-X 5.0及以上版本中,手势开发全攻略:

在 HarmonyOS 应用开发中&#xff0c;手势交互是连接用户与设备的核心纽带。ArkTS 框架提供了丰富的手势处理能力&#xff0c;既支持点击、长按、拖拽等基础单一手势的精细控制&#xff0c;也能通过多种绑定策略解决父子组件的手势竞争问题。本文将结合官方开发文档&#xff0c…...

Leetcode 3577. Count the Number of Computer Unlocking Permutations

Leetcode 3577. Count the Number of Computer Unlocking Permutations 1. 解题思路2. 代码实现 题目链接&#xff1a;3577. Count the Number of Computer Unlocking Permutations 1. 解题思路 这一题其实就是一个脑筋急转弯&#xff0c;要想要能够将所有的电脑解锁&#x…...

STM32标准库-DMA直接存储器存取

文章目录 一、DMA1.1简介1.2存储器映像1.3DMA框图1.4DMA基本结构1.5DMA请求1.6数据宽度与对齐1.7数据转运DMA1.8ADC扫描模式DMA 二、数据转运DMA2.1接线图2.2代码2.3相关API 一、DMA 1.1简介 DMA&#xff08;Direct Memory Access&#xff09;直接存储器存取 DMA可以提供外设…...

转转集团旗下首家二手多品类循环仓店“超级转转”开业

6月9日&#xff0c;国内领先的循环经济企业转转集团旗下首家二手多品类循环仓店“超级转转”正式开业。 转转集团创始人兼CEO黄炜、转转循环时尚发起人朱珠、转转集团COO兼红布林CEO胡伟琨、王府井集团副总裁祝捷等出席了开业剪彩仪式。 据「TMT星球」了解&#xff0c;“超级…...

如何将联系人从 iPhone 转移到 Android

从 iPhone 换到 Android 手机时&#xff0c;你可能需要保留重要的数据&#xff0c;例如通讯录。好在&#xff0c;将通讯录从 iPhone 转移到 Android 手机非常简单&#xff0c;你可以从本文中学习 6 种可靠的方法&#xff0c;确保随时保持连接&#xff0c;不错过任何信息。 第 1…...

微信小程序云开发平台MySQL的连接方式

注&#xff1a;微信小程序云开发平台指的是腾讯云开发 先给结论&#xff1a;微信小程序云开发平台的MySQL&#xff0c;无法通过获取数据库连接信息的方式进行连接&#xff0c;连接只能通过云开发的SDK连接&#xff0c;具体要参考官方文档&#xff1a; 为什么&#xff1f; 因为…...

ArcGIS Pro制作水平横向图例+多级标注

今天介绍下载ArcGIS Pro中如何设置水平横向图例。 之前我们介绍了ArcGIS的横向图例制作&#xff1a;ArcGIS横向、多列图例、顺序重排、符号居中、批量更改图例符号等等&#xff08;ArcGIS出图图例8大技巧&#xff09;&#xff0c;那这次我们看看ArcGIS Pro如何更加快捷的操作。…...

Typeerror: cannot read properties of undefined (reading ‘XXX‘)

最近需要在离线机器上运行软件&#xff0c;所以得把软件用docker打包起来&#xff0c;大部分功能都没问题&#xff0c;出了一个奇怪的事情。同样的代码&#xff0c;在本机上用vscode可以运行起来&#xff0c;但是打包之后在docker里出现了问题。使用的是dialog组件&#xff0c;…...

SQL慢可能是触发了ring buffer

简介 最近在进行 postgresql 性能排查的时候,发现 PG 在某一个时间并行执行的 SQL 变得特别慢。最后通过监控监观察到并行发起得时间 buffers_alloc 就急速上升,且低水位伴随在整个慢 SQL,一直是 buferIO 的等待事件,此时也没有其他会话的争抢。SQL 虽然不是高效 SQL ,但…...