基于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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/897083.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

文档处理控件Aspose.Total教程:使用 C# 将 Obsidian Markdown 转换为 OneNote

Obsidian 是一款广泛使用的基于 Markdown 的笔记应用程序。它提供了一种强大而有效的方式来构建和组织想法。用户可以无缝地连接他们的想法,提高清晰度和工作效率。另一方面,OneNote 是 Microsoft 的一款功能强大的笔记应用程序。它还可以帮助用户组织他…

第5章:vuex

第5章:vuex 1 求和案例 纯vue版2 vuex工作原理图3 vuex案例3.1 搭建vuex环境错误写法正确写法 3.2 求和案例vuex版细节分析源代码 4 getters配置项4.1 细节4.2 源代码 5 mapState与mapGetters5.1 总结5.2 细节分析5.3 源代码 6 mapActions与mapMutations6.1 总结6.2…

迷你世界脚本对象库接口:ObjectLib

对象库接口:ObjectLib 迷你世界 更新时间: 2023-04-26 20:21:09 具体函数名及描述如下: 序号 函数名 函数描述 1 getAreaData(...) 获取区域数据 2 getPositionData(...) 获取位置数据 3 getLivingData(...) 获取生物数据 4 getItemDat…

测试是如何跟进和管理 bug

测试在跟进和管理 Bug定位精确、问题反馈及时、修复闭环高效 三大关键环节中起到了至关重要的作用。Bug定位精确 是整个流程的基础,通过详细记录和复现问题,可以帮助开发团队迅速找出缺陷根源;而及时有效的反馈机制则确保问题不会被遗漏&…

运动控制卡--固高实用

目录 组件 配置参数 编程控制 组件 我手头有固高卡,记录使用。 用运动控制卡 伺服(步进)电机搭建一个运动控制系统,主要包括:1、控制器 2、端子板 1、控制器 2、端子板 3、伺服(步进)…

2025年能源工作指导意见

2025年是“十四五”规划收官之年,做好全年能源工作意义重大。为深入贯彻落实党中央、国务院决策部署,以能源高质量发展和高水平安全助力我国经济持续回升向好,满足人民群众日益增长的美好生活用能需求,制定本意见。 一、总体要求…

键值对(C++实现)

目录 键值对的定义 键值对的底层实现 键值对的作用 键值对的使用 对键值对中的值的搜索 一、键值对的定义 键值对(Key-Value Pair)是一种数据结构,用于存储和表示两个相关联的值。在键值对中,一个值被关联到一个唯一的键上&…

使用 Docker 部署 RabbitMQ 并实现数据持久化

非常好!以下是一份完整的 Docker 部署 RabbitMQ 的博客文档,包含从安装到问题排查的详细步骤。你可以直接将其发布到博客中。 使用 Docker 部署 RabbitMQ 并实现数据持久化 RabbitMQ 是一个开源的消息队列系统,广泛应用于分布式系统中。使用…

springboot429-基于springboot的教务管理系统(源码+数据库+纯前后端分离+部署讲解等)

💕💕作者: 爱笑学姐 💕💕个人简介:十年Java,Python美女程序员一枚,精通计算机专业前后端各类框架。 💕💕各类成品Java毕设 。javaweb,ssm&#xf…

my学习网址

文章目录 1.软件版本管控GIT学习网站大全1官方文档类2在线教程类3互动学习类4问答社区类 Linux学习网址1、 Linux命令行与shell脚本编程大全 1.软件版本管控 GIT学习网站大全 廖雪峰网站 以下为你推荐不同类型的学习Git的网站: 1官方文档类 Git官方文档 网址&am…

Best practice-生产环境中加锁的最佳实践

什么是死锁? 场景:图书馆有两个相邻的储物柜(柜子A和柜子B),小明和小红需要同时使用这两个柜子才能完成借书流程。 互斥资源 每个柜子只有一把钥匙,且一次只能被一人使用(资源不可共享&#x…

极狐GitLab 17.9 正式发布,40+ DevSecOps 重点功能解读【四】

GitLab 是一个全球知名的一体化 DevOps 平台,很多人都通过私有化部署 GitLab 来进行源代码托管。极狐GitLab 是 GitLab 在中国的发行版,专门为中国程序员服务。可以一键式部署极狐GitLab。 学习极狐GitLab 的相关资料: 极狐GitLab 官网极狐…

黄昏时间户外街拍人像Lr调色教程,手机滤镜PS+Lightroom预设下载!

调色介绍 黄昏时分有着独特而迷人的光线,使此时拍摄的人像自带一种浪漫、朦胧的氛围 。通过 Lr 调色,可以进一步强化这种特质并根据不同的风格需求进行创作。Lr(Lightroom)作为专业的图像后期处理软件,提供了丰富的调色…

Spring Boot 项目中 Redis 常见问题及解决方案

目录 缓存穿透缓存雪崩缓存击穿Redis 连接池耗尽Redis 序列化问题总结 1. 缓存穿透 问题描述 缓存穿透是指查询一个不存在的数据,由于缓存中没有该数据,请求会直接打到数据库上,导致数据库压力过大。 解决方案 缓存空值:即使…

信息系统项目管理师--整合管理

信息系统项目管理师–整合管理

关于tomcat使用中浏览器打开index.jsp后中文显示不正常是乱码,但英文正常的问题

如果是jsp文件就在首行加 “<% page language"java" contentType"text/html; charsetUTF-8" pageEncoding"UTF-8" %>” 如果是html文件 在head标签加入&#xff1a; <meta charset"UTF-8"> 以jsp为例子&#xff0c;我们…

微服务的春天:基于Spring Boot的架构设计与实践

微服务的春天:基于Spring Boot的架构设计与实践 在如今的技术领域,微服务架构俨然成为了解决复杂系统开发与运维挑战的关键利器。作为一名资深运维和自媒体创作者,笔名Echo_Wish,我将深入探讨基于Spring Boot的微服务架构设计,结合实例代码说明观点,希望能为大家带来启发…

JVM参数调整

一、内存相关参数 1. 堆内存控制 -Xmx&#xff1a;最大堆内存&#xff08;如 -Xmx4g&#xff0c;默认物理内存1/4&#xff09;。-Xms&#xff1a;初始堆内存&#xff08;建议与-Xmx相等&#xff0c;避免动态扩容带来的性能波动&#xff09;。-Xmn&#xff1a;新生代大小&…

AVM 环视拼接 鱼眼相机

https://zhuanlan.zhihu.com/p/651306620 AVM 环视拼接方法介绍 从内外参推导IPM变换方程及代码实现&#xff08;生成AVM环视拼接图&#xff09;_avm拼接-CSDN博客 经典文献阅读之--Extrinsic Self-calibration of the Surround-view System: A Weakly... (环视系统的外参自…

【哇! C++】类和对象(三) - 构造函数和析构函数

目录 一、构造函数 1.1 构造函数的引入 1.2 构造函数的定义和语法 1.2.1 无参构造函数&#xff1a; 1.2.2 带参构造函数 1.3 构造函数的特性 1.4 默认构造函数 二、析构函数 2.1 析构函数的概念 2.2 特性 如果一个类中什么成员都没有&#xff0c;简称为空类。 空类中…