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/
=============================================
docker: Error response from daemon: Conflict. The container name "/paddlelite_docker" is already in use by container "a3bdc709be93e3a67b995fea219ebdcce63ba556423684b1a4f5bdffe79946f3". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a3bdc709be93 paddlepaddle/paddle-lite "/bin/bash" 10 hours ago Exited (0) 8 hours ago paddlelite_docker
b953cdfddbff tensorflow/tensorflow:latest-gpu "/run_jupyter.sh --a…" 2 years ago Exited (137) 2 years ago magical_sammet
306e81b9bad3 hello-world "/hello" 2 years ago Exited (0) 2 years ago frosty_buck
24089df7aa72 tensorflow/tensorflow:latest-gpu "/run_jupyter.sh --a…" 6 years ago Exited (137) 6 years ago
停止容器
docker stop /mysql
可以用命令 sudo docker container ls -all 看下本机正在运行的容器,
docker container ls -all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a3bdc709be93 paddlepaddle/paddle-lite "/bin/bash" 10 hours ago Exited (0) 8 hours ago paddlelite_docker
解决方法:
(1) 给容器换一个名字, 比如说 docker run -it --name=myubuntu2 ubuntu /bin/bash, 可以解决问题.
(2) 将原来的容器删除, docker container rm myubuntu (提示: 这一步要确定删除容器没问题的情况下, 才可以做)
先查看所有的容器(包括已经停止的容器)
在终端输入:
docker ps -a
停止容器
docker stop /mysql
可以用命令 sudo docker container ls -all 看下本机正在运行的容器,
docker container ls -all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a3bdc709be93 paddlepaddle/paddle-lite "/bin/bash" 10 hours ago Exited (0) 8 hours ago paddlelite_docker
解决方法:
(1) 给容器换一个名字, 比如说 docker run -it --name=myubuntu2 ubuntu /bin/bash, 可以解决问题.
(2) 将原来的容器删除, docker container rm myubuntu (提示: 这一步要确定删除容器没问题的情况下, 才可以做)
docker exec -it paddlelite_docker /bin/bash
(base) [root@ibiomed ~]# docker container ls -all #列出运行中的容器,同时提供关于容器有用的信息。
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a3bdc709be93 paddlepaddle/paddle-lite "/bin/bash" 10 hours ago Exited (0) 8 hours ago paddlelite_docker
(base) [root@ibiomed ~]# docker exec -it a3bdc709be93 /bin/bash
Error response from daemon: Container a3bdc709be93e3a67b995fea219ebdcce63ba556423684b1a4f5bdffe79946f3 is not running
(base) [root@ibiomed ~]# docker exec -it paddlelite_docker /bin/bash
Error response from daemon: Container a3bdc709be93e3a67b995fea219ebdcce63ba556423684b1a4f5bdffe79946f3 is not running
(base) [root@ibiomed ~]# docker attach a3bdc709be93
You cannot attach to a stopped container, start it first
停止容器
使用 docker stop 命令来停止正在运行的容器。你需要提供容器的 ID 或名称。
docker stop 容器ID或名称
重启容器
使用 docker start 命令来启动(实际上是重启)容器。
docker start 容器ID或名称
进入容器
使用 docker exec 命令来进入容器的命令行界面。
docker exec -it 容器ID或名称 /bin/bash
注意:如果你的容器是基于 Alpine Linux 或其他不包含 /bin/bash 的镜像,你可能需要使用 /bin/sh 或其他可用的 shell。例如:
docker exec -it 容器ID或名称 /bin/sh
=============================================

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

镜像加速源
| 镜像加速器 | 镜像加速器地址 |
|---|---|
| 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)设置镜像
=============================================

浙公网安备 33010602011771号