windows下DockerDesktop命令行方式指定目录安装

news/2024/10/7 15:15:16 标签: windows, docker

windowsDockerDesktop_0">windows下DockerDesktop指定目录安装(重新安装)

因为DcokerDesktop占用内存较大, 并且拉去镜像后占用本地空间较多,所以建议安装时就更改默认安装路径镜像存储路径

这里,展示了从下载到安装的过程:

  1. 首先下载DcokerDesktop;
  2. 找到Docker Desktop Installer.exe 并重命名为 dockerdesk.exe , 并建议将其移动到全英文路径下(我这里放在了J:/dockerdesk.exe);
  3. 阅读官方安装指南docker desktop从命令行安装install-from-the-command-line 按需要添加参数,更改默认安装目录.
    可以看到, 文档中官方给出的命令行参数说明很详细;

可以在本地powershell中使用 如下方式查看dockerdesk.exe都有哪些参数: (记得重命名, .exe名称有空格,用cmd执行起来比较麻烦)

PS J:\> ./dockerdesk.exe --help
PS J:\> 
Installs Docker Desktop

"dockerdesk.exe" install [--quiet] [--accept-license] [--backend=wsl-2 | --backend=hyper-v | --backend=windows] [--allowed-org=<org name>]

--quiet                   Suppresses information output when running the installer
--accept-license          Accepts the Docker Subscription Service Agreement now, rather than requiring it to be accepted when the application is first run
--no-windows-containers   Disables Windows containers integration
--allowed-org=<org name>  Requires the user to sign in and be part of the specified Docker Hub organization when running the application
--backend=<backend name>  Selects the default backend to use for Docker Desktop, hyper-v, windows or wsl-2 (default)
--always-run-service  Keep service always running, so regular users can switch to windows containers or hyper-v without being prompted for admin rights
--installation-dir=<path> Changes the default installation location (C:\Program Files\Docker\Docker)     
--hyper-v-default-data-root=<path> Changes the default hyper-v VM disk location
--windows-containers-default-data-root=<path> Changes the default windows containers data root
--wsl-default-data-root=<path> Changes the default wsl data location
--admin-settings=<json> Used as admin settings for hardened desktop (needs to use --allowed-org and specify a business tier org)
--proxy-http-mode=<mode> HTTP Proxy mode, system (default) or manual
--override-proxy-http=<URL> URL of the HTTP proxy that must be used for outgoing HTTP requests
--override-proxy-https=<URL> URL of the HTTP proxy that must be used for outgoing HTTPS requests
--override-proxy-exclude=<hosts/domains> Bypass proxy settings for these hosts & domains, comma-separated list
--proxy-enable-kerberosntlm Enables Kerberos/NTLM proxy authentication
  1. 要做什么? 我的需求是

    • 指定 docker-desktop 安装位置(软件本体), 为 H:\program\DockerDesktop
    • 指定 docker-desktop-data 安装位置(本地镜像等存储路径,即为 Settings->Resources Advanced-> Disk image location的路径),为H:\program\DockerDesktopWSL
  2. 编写命令行(用powershellJ:/dockerdesk.exe同级目录执行)

使用了如下参数
./dockerdesk.exe install
–accept-license --backend=wsl-2
–installation-dir=‘docker-desktop安装位置’
–wsl-default-data-root=‘docker-desktop-data安装位置’

命令执行前,请创建好 H:\program\DockerDesktopWSL H:\program\DockerDesktop这两个安装文件夹,不然可能出现意外的错误.

我使用的安装命令为: (使用powershell执行)

./dockerdesk.exe install --accept-license --backend=wsl-2 --installation-dir='H:\program\DockerDesktop' --wsl-default-data-root='H:\program\DockerDesktopWSL' 
  1. 稍等片刻, 按照提示安装下一步next,安装完成.
  2. 打开软件,查看安装设置无误:
    在这里插入图片描述6

windowsDockerDesktop_60">windows下DockerDesktop的安装位置迁移(不需要重新安装)

  • Win11 安装 Docker Desktop 和 WSL2 并进行安装位置迁移

http://www.niftyadmin.cn/n/5692963.html

相关文章

TM1618控制共阳极数码管的数据传送问题

数据传送中的问题 首先每个字节是按照一个地址写入的&#xff0c;而共阳极数码管的公共端是SEG引脚连接的。这使得数码管显示的编码是按照竖向的字节。如下图所示中&#xff0c;横向是公共端&#xff0c;竖向是实际编码字符字节。 数据转换方式 这样可以一次写入所有需要显示…

请描述一下数据库的负载测试和压力测试。请简要描述不同类型的联接(如内联接、左外联接、右外联接、全外联接等)。

请描述一下数据库的负载测试和压力测试。 一、数据库的负载测试 定义&#xff1a; 负载测试是通过模拟实际用户量和操作情况来评估数据库系统的性能和稳定性的过程。它主要通过逐步增加系统负载&#xff0c;测试系统性能的变化&#xff0c;并最终确定在满足性能指标的情况下&a…

MySql的基本语法操作

查看数据库和表 查看所有的数据库 show databases; 建立一个新的数据库 create database database_name; 也可以是 create database if not exists database_name; 表示这个数据库不存在才建立 而不会打断其他sql语句的执行&#xff0c;而如果没有加的话&#xff0c;创建…

C语言复习概要(四)

本文 1. 操作符的分类算术操作符关系操作符逻辑操作符 2. 二进制制和进制转换二进制与十六进制的表示进制转换算法 3. 原码、反码和补码原码反码补码 1. 操作符的分类 C语言中的操作符种类繁多&#xff0c;常用的主要操作符可以按照其功能进行如下分类&#xff1a; 算术操作符…

DOS 命令学习笔记

一、DOS 简介 DOS 是 Disk Operating System 的缩写&#xff0c;即磁盘操作系统。它是一种早期的计算机操作系统&#xff0c;用于管理计算机的硬件资源和软件资源&#xff0c;提供用户与计算机交互的界面。 二、基本 DOS 命令 &#xff08;一&#xff09;Dir 命令 功能&…

图文深入理解Oracle DB Scheduler

值此国庆佳节&#xff0c;深宅家中&#xff0c;闲来无事&#xff0c;就多写几篇博文。今天继续宅继续写。本篇图文深入介绍Oracle DB Scheduler。 Oracle为什么要使Scheduler&#xff1f; 答案就是6个字&#xff1a;简化管理任务。 • Scheduler&#xff08;调度程序&#x…

Django模型实现外键自关联

Django模型实现外键自关联 1、场景 省市区、评论 2、模型models.py from django.db import models 资讯评论:资讯,用户,是否取消,时间 class CommentInfomation(models.Model):info = models

vscode环境迁移

关注B站可以观看更多实战教学视频&#xff1a;hallo128的个人空间 vscode环境迁移 Setting 即可打开settings.json {"python.pythonPath": "/Users/apple/opt/anaconda3/bin/python","cmake.cmakePath": "/usr/local/bin/cmake",&qu…