• docker


    https://labs.play-with-docker.com/  [YaoFanQiang]

    https://www.bilibili.com/video/BV1R4411F7t9

    https://www.bilibili.com/video/BV1s54y1n7Ev/

    https://www.bilibili.com/video/BV11L411g7U1/

    https://docker.easydoc.net/

    =============================================

    安装和常用CLI:
    添加阿里云镜像:sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    安装命令:sudo yum install -y docker-ce docker-ce-cli containerd.io
    启动命令:sudo systemctl start docker
    添加当前用户到docker用户组:sudo usermod -aG docker $USER (需注销),newgrp docker (立即生效)
    Helloworld:docker run hello-world (本地没有镜像的话会自动从远端仓库pull)
    pull nginx 镜像:docker pull nginx(等效于nginx:latest)
    运行:docker run -【d】(后台运行不阻塞shell) 【-p 80:80】(指定容器端口映射,内部:外部) nginx
    查看正在运行:docker ps
    删除容器:docker rm -f <container id(不用打全,前缀区分)>
    进入bash:docker exec -it <container id(不用打全,前缀区分)> bash
    commit镜像:docker commit <container id(不用打全,前缀区分)> <name>
    查看镜像列表:docker images (刚才commit的镜像)
    使用运行刚才commit的镜像:docker run -d <name>
    使用Dockerfile构建镜像:docker build -t <name> <存放Dockerfile的文件夹>
    删除镜像:docker rmi <name>
    保存为tar:docker save <name> > <tar name>
    从tar加载:docker load < <tar name>

    一些启动参数:
    后台运行容器:-d
    容器内外端口映射:-p 内部端口号:外部端口号
    目录映射:-v 'dir name' : <dir>
    指定映像版本:<name>:<ver>

    -p 主机端口号:容器端口号

    ======================================

    镜像加速器镜像加速器地址
    Docker 中国官方镜像 https://registry.docker-cn.com
    DaoCloud 镜像站 http://f1361db2.m.daocloud.io
    Azure 中国镜像 https://dockerhub.azk8s.cn
    科大镜像站 https://docker.mirrors.ustc.edu.cn
    阿里云 https://<your_code>.mirror.aliyuncs.com
    七牛云 https://reg-mirror.qiniu.com
    网易云 https://hub-mirror.c.163.com
    腾讯云 https://mirror.ccs.tencentyun.com

    {
    "registry-mirrors":["https://registry.docker-cn.com"],
      "builder": {
        "gc": {
          "defaultKeepStorage": "20GB",
          "enabled": true
        }
      },
      "experimental": false,
      "features": {
        "buildkit": true
      }
    }

    =============================================

    System.InvalidOperationException:
    Failed to set version to docker-desktop: exit code: -1
     stdout: The attempted operation is not supported for the type of object referenced.


     stderr:
       at Docker.ApiServices.WSL2.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) in C:\workspaces\4.12.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\WSL2\WslCommand.cs:line 160
       at Docker.Engines.WSL2.WSL2Provisioning.<ProvisionAsync>d__8.MoveNext() in C:\workspaces\4.12.x\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\WSL2Provisioning.cs:line 81
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__26.MoveNext() in C:\workspaces\4.12.x\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 170
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\4.12.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\4.12.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 67
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\4.12.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Docker.ApiServices.StateMachines.EngineStateMachine.<StartAsync>d__14.MoveNext() in C:\workspaces\4.12.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 69
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Docker.Engines.Engines.<StartAsync>d__22.MoveNext() in C:\workspaces\4.12.x\src\github.com\docker\pinata\win\src\Docker.Engines\Engines.cs:line 107

    =============================================

     Microsoft Windows [Version 10.0.19044.1889]
    (c) Microsoft Corporation. All rights reserved.

    C:\Users\Administrator>netsh winsock reset

    Sucessfully reset the Winsock Catalog.
    You must restart the computer in order to complete the reset.


    C:\Users\Administrator>
    =============================================

    https://cloud.tencent.com/developer/article/1924925

    NoLsp.exe c:\windows\system32\wsl.exe

     NoLsp.exe: http://www.proxifier.com/tmp/Test20200228/NoLsp.exe

    =============================================

    1) 安装,升级WSL

    2)启用hpyer-v

    3)netsh winsock reset; NoLsp.exe c:\windows\system32\wsl.exe

    4)多次重启系统

    5)设置镜像

    =============================================

  • 相关阅读:
    38861cba61c66739c1452c3a71e39852.ttf net::ERR_ABORTED 404 (Not Found)
    php 进制转换base_convert
    mysql find_in_set 函数 使用方法
    xmind 破解
    python 获取 一个正整数的二进制
    算法 求一个数的平方根
    详细的描述一个测试活动完整的过程。
    常见的测试用例设计方法都有哪些?请分别以具体的例子来说明这些方法在测试用例设计工作中的应用。
    HTTP 协议中 Vary 的一些研究
    svn cleanup failed–previous operation has not finished; run cleanup if it was interrupted
  • 原文地址:https://www.cnblogs.com/emanlee/p/16654556.html
Copyright © 2020-2023  润新知