基于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.pswp.cn/news/897083.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/897083.shtml
英文地址,請注明出處:http://en.pswp.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;簡稱為空類。 空類中…