在 Ubuntu 20.04 上学习如何安装和使用 Docker
最编程
2024-01-01 18:20:11
...
<pre><font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ sudo apt update
[sudo] libin 的密码:
命中:1 http://dl.google.com/linux/chrome/deb stable InRelease
命中:2 http://cn.archive.ubuntu.com/ubuntu focal InRelease
获取:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
获取:4 http://cn.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
命中:5 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease<font color="#C4A000"> </font>
获取:6 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
忽略:7 http://ppa.launchpad.net/wine/wine-builds/ubuntu focal InRelease<font color="#C4A000"> </font>
获取:8 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [283 kB]
错误:9 http://ppa.launchpad.net/wine/wine-builds/ubuntu focal Release<font color="#C4A000"> </font>
404 Not Found [IP: 91.189.95.85 80]
获取:10 http://cn.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [504 B]
获取:11 http://cn.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [363 kB]
获取:12 http://cn.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]
获取:13 http://cn.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [10.4 kB]
获取:14 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [29.0 kB]<font color="#C4A000"> </font>
获取:15 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [63.9 kB]
获取:16 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2,464 B]
正在读取软件包列表... 完成<font color="#C4A000"> </font>
<font color="#CC0000"><b>E: </b></font>仓库 “http://ppa.launchpad.net/wine/wine-builds/ubuntu focal Release” 没有 Release 文件。
<font color="#C4A000">N: </font>无法安全地用该源进行更新,所以默认禁用该源。
<font color="#C4A000">N: </font>参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
ca-certificates 已经是最新版 (20210119~20.04.2)。
ca-certificates 已设置为手动安装。
software-properties-common 已经是最新版 (0.98.9.5)。
software-properties-common 已设置为手动安装。
下列软件包是自动安装的并且现在不需要了:
chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libgstreamer-plugins-bad1.0-0 libva-wayland2
linux-headers-5.11.0-27-generic linux-hwe-5.11-headers-5.11.0-27 linux-image-5.11.0-27-generic
linux-modules-5.11.0-27-generic linux-modules-extra-5.11.0-27-generic
linux-objects-nvidia-470-5.11.0-27-generic linux-signatures-nvidia-5.11.0-27-generic
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:
apt-transport-https curl gnupg-agent
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 41 个软件包未被升级。
需要下载 171 kB 的归档。
解压缩后会消耗 620 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://cn.archive.ubuntu.com/ubuntu focal-updates/universe amd64 apt-transport-https all 2.0.6 [4,680 B]
获取:2 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 curl amd64 7.68.0-1ubuntu2.7 [161 kB]
获取:3 http://cn.archive.ubuntu.com/ubuntu focal-updates/universe amd64 gnupg-agent all 2.2.19-3ubuntu2.1 [5,232 B]
已下载 171 kB,耗时 5秒 (31.3 kB/s)<font color="#C4A000"> </font>
正在选中未选择的软件包 apt-transport-https。
(正在读取数据库 ... 系统当前共安装有 256822 个文件和目录。)
准备解压 .../apt-transport-https_2.0.6_all.deb ...
正在解压 apt-transport-https (2.0.6) ...
正在选中未选择的软件包 curl。
准备解压 .../curl_7.68.0-1ubuntu2.7_amd64.deb ...
正在解压 curl (7.68.0-1ubuntu2.7) ...
正在选中未选择的软件包 gnupg-agent。
准备解压 .../gnupg-agent_2.2.19-3ubuntu2.1_all.deb ...
正在解压 gnupg-agent (2.2.19-3ubuntu2.1) ...
正在设置 apt-transport-https (2.0.6) ...
正在设置 gnupg-agent (2.2.19-3ubuntu2.1) ...
正在设置 curl (7.68.0-1ubuntu2.7) ...
正在处理用于 man-db (2.9.1-1) 的触发器 ...
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
获取:1 https://download.docker.com/linux/ubuntu focal InRelease [57.7 kB]
命中:2 http://dl.google.com/linux/chrome/deb stable InRelease
命中:3 http://cn.archive.ubuntu.com/ubuntu focal InRelease
获取:4 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages [11.6 kB]
命中:5 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease
命中:6 http://cn.archive.ubuntu.com/ubuntu focal-updates InRelease
命中:7 http://security.ubuntu.com/ubuntu focal-security InRelease
命中:8 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease
忽略:9 http://ppa.launchpad.net/wine/wine-builds/ubuntu focal InRelease
错误:10 http://ppa.launchpad.net/wine/wine-builds/ubuntu focal Release
404 Not Found [IP: 91.189.95.85 80]
正在读取软件包列表... 完成
E: 仓库 “http://ppa.launchpad.net/wine/wine-builds/ubuntu focal Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
命中:1 https://download.docker.com/linux/ubuntu focal InRelease
命中:2 http://dl.google.com/linux/chrome/deb stable InRelease
命中:3 http://security.ubuntu.com/ubuntu focal-security InRelease
命中:4 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease
命中:5 http://cn.archive.ubuntu.com/ubuntu focal InRelease
命中:6 http://cn.archive.ubuntu.com/ubuntu focal-updates InRelease
命中:7 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease
忽略:8 http://ppa.launchpad.net/wine/wine-builds/ubuntu focal InRelease
错误:9 http://ppa.launchpad.net/wine/wine-builds/ubuntu focal Release
404 Not Found [IP: 91.189.95.85 80]
正在读取软件包列表... 完成
E: 仓库 “http://ppa.launchpad.net/wine/wine-builds/ubuntu focal Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ sudo apt update
命中:1 http://dl.google.com/linux/chrome/deb stable InRelease
命中:2 https://download.docker.com/linux/ubuntu focal InRelease <font color="#C4A000"> </font>
命中:3 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease<font color="#C4A000"> </font>
命中:4 http://cn.archive.ubuntu.com/ubuntu focal InRelease<font color="#C4A000"> </font>
命中:5 http://security.ubuntu.com/ubuntu focal-security InRelease
命中:6 http://cn.archive.ubuntu.com/ubuntu focal-updates InRelease
忽略:7 http://ppa.launchpad.net/wine/wine-builds/ubuntu focal InRelease
命中:8 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease
错误:9 http://ppa.launchpad.net/wine/wine-builds/ubuntu focal Release
404 Not Found [IP: 91.189.95.85 80]
正在读取软件包列表... 完成<font color="#C4A000"> </font>
<font color="#CC0000"><b>E: </b></font>仓库 “http://ppa.launchpad.net/wine/wine-builds/ubuntu focal Release” 没有 Release 文件。
<font color="#C4A000">N: </font>无法安全地用该源进行更新,所以默认禁用该源。
<font color="#C4A000">N: </font>参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ sudo apt install docker-ce docker-ce-cli containerd.io
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libgstreamer-plugins-bad1.0-0 libva-wayland2
linux-headers-5.11.0-27-generic linux-hwe-5.11-headers-5.11.0-27 linux-image-5.11.0-27-generic
linux-modules-5.11.0-27-generic linux-modules-extra-5.11.0-27-generic
linux-objects-nvidia-470-5.11.0-27-generic linux-signatures-nvidia-5.11.0-27-generic
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
docker-ce-rootless-extras docker-scan-plugin pigz slirp4netns
建议安装:
aufs-tools cgroupfs-mount | cgroup-lite
下列【新】软件包将被安装:
containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras docker-scan-plugin pigz slirp4netns
升级了 0 个软件包,新安装了 7 个软件包,要卸载 0 个软件包,有 41 个软件包未被升级。
需要下载 95.6 MB 的归档。
解压缩后会消耗 403 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 https://download.docker.com/linux/ubuntu focal/stable amd64 containerd.io amd64 1.4.11-1 [23.7 MB]
获取:2 http://cn.archive.ubuntu.com/ubuntu focal/universe amd64 pigz amd64 2.4-1 [57.4 kB]
获取:3 http://cn.archive.ubuntu.com/ubuntu focal/universe amd64 slirp4netns amd64 0.4.3-1 [74.3 kB]
获取:4 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce-cli amd64 5:20.10.9~3-0~ubuntu-focal [38.8 MB]
获取:5 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce amd64 5:20.10.9~3-0~ubuntu-focal [21.2 MB]
获取:6 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce-rootless-extras amd64 5:20.10.9~3-0~ubuntu-focal [7,914 kB]
获取:7 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-scan-plugin amd64 0.8.0~ubuntu-focal [3,889 kB]
已下载 95.6 MB,耗时 51秒 (1,867 kB/s)
正在选中未选择的软件包 pigz。
(正在读取数据库 ... 系统当前共安装有 256837 个文件和目录。)
准备解压 .../0-pigz_2.4-1_amd64.deb ...
正在解压 pigz (2.4-1) ...
正在选中未选择的软件包 containerd.io。
准备解压 .../1-containerd.io_1.4.11-1_amd64.deb ...
正在解压 containerd.io (1.4.11-1) ...
正在选中未选择的软件包 docker-ce-cli。
准备解压 .../2-docker-ce-cli_5%3a20.10.9~3-0~ubuntu-focal_amd64.deb ...
正在解压 docker-ce-cli (5:20.10.9~3-0~ubuntu-focal) ...
正在选中未选择的软件包 docker-ce。
准备解压 .../3-docker-ce_5%3a20.10.9~3-0~ubuntu-focal_amd64.deb ...
正在解压 docker-ce (5:20.10.9~3-0~ubuntu-focal) ...
正在选中未选择的软件包 docker-ce-rootless-extras。
准备解压 .../4-docker-ce-rootless-extras_5%3a20.10.9~3-0~ubuntu-focal_amd64.deb ...
正在解压 docker-ce-rootless-extras (5:20.10.9~3-0~ubuntu-focal) ...
正在选中未选择的软件包 docker-scan-plugin。
准备解压 .../5-docker-scan-plugin_0.8.0~ubuntu-focal_amd64.deb ...
正在解压 docker-scan-plugin (0.8.0~ubuntu-focal) ...
正在选中未选择的软件包 slirp4netns。
准备解压 .../6-slirp4netns_0.4.3-1_amd64.deb ...
正在解压 slirp4netns (0.4.3-1) ...
正在设置 slirp4netns (0.4.3-1) ...
正在设置 docker-scan-plugin (0.8.0~ubuntu-focal) ...
正在设置 containerd.io (1.4.11-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/co
ntainerd.service.
正在设置 docker-ce-cli (5:20.10.9~3-0~ubuntu-focal) ...
正在设置 pigz (2.4-1) ...
正在设置 docker-ce-rootless-extras (5:20.10.9~3-0~ubuntu-focal) ...
正在设置 docker-ce (5:20.10.9~3-0~ubuntu-focal) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker
.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.soc
ket.
正在处理用于 man-db (2.9.1-1) 的触发器 ...
正在处理用于 systemd (245.4-4ubuntu3.13) 的触发器 ...
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ sudo systemctl status docker
<font color="#4E9A06"><b>●</b></font> docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: <font color="#4E9A06"><b>active (running)</b></font> since Wed 2021-10-20 19:43:01 CST; 1min 4s ago
TriggeredBy: <font color="#4E9A06"><b>●</b></font> docker.socket
Docs: https://docs.docker.com
Main PID: 109002 (dockerd)
Tasks: 18
Memory: 31.9M
CGroup: /system.slice/docker.service
└─109002 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
10月 20 19:43:01 oak dockerd[109002]: time="2021-10-20T19:43:01.540055411+08:00" level=warning msg="Yo<span style="background-color:#FFFFFF"><font color="#300A24">></font></span>
10月 20 19:43:01 oak dockerd[109002]: time="2021-10-20T19:43:01.540070677+08:00" level=warning msg="Yo<span style="background-color:#FFFFFF"><font color="#300A24">></font></span>
10月 20 19:43:01 oak dockerd[109002]: time="2021-10-20T19:43:01.540074934+08:00" level=warning msg="Yo<span style="background-color:#FFFFFF"><font color="#300A24">></font></span>
10月 20 19:43:01 oak dockerd[109002]: time="2021-10-20T19:43:01.540183994+08:00" level=info msg="Loadi<span style="background-color:#FFFFFF"><font color="#300A24">></font></span>
10月 20 19:43:01 oak dockerd[109002]: time="2021-10-20T19:43:01.597684235+08:00" level=info msg="Defau<span style="background-color:#FFFFFF"><font color="#300A24">></font></span>
10月 20 19:43:01 oak dockerd[109002]: time="2021-10-20T19:43:01.624409976+08:00" level=info msg="Loadi<span style="background-color:#FFFFFF"><font color="#300A24">></font></span>
10月 20 19:43:01 oak dockerd[109002]: time="2021-10-20T19:43:01.636398780+08:00" level=info msg="Docke<span style="background-color:#FFFFFF"><font color="#300A24">></font></span>
10月 20 19:43:01 oak dockerd[109002]: time="2021-10-20T19:43:01.636475816+08:00" level=info msg="Daemo<span style="background-color:#FFFFFF"><font color="#300A24">></font></span>
10月 20 19:43:01 oak systemd[1]: Started Docker Application Container Engine.
10月 20 19:43:01 oak dockerd[109002]: time="2021-10-20T19:43:01.652738445+08:00" level=info msg="API l<span style="background-color:#FFFFFF"><font color="#300A24">></font></span>
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ sudo usermod -aG docker $USER
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ docker container run hello-world
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ docker ps
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ sudo chmod 666 /var/run/docker.sock
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ docker container run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pulling fs layer
docker: error pulling image configuration: Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/fe/feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412/data?verify=1634733430-VmtIwrU5jr5B8Ukm8s2XoZeZNlo%3D": dial tcp: lookup production.cloudflare.docker.com: Temporary failure in name resolution.
See 'docker run --help'.
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ sudo setfacl --modify user::rw /var/run/docker.sock
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ docker container run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:37a0b92b08d4919615c3ee023f7ddb068d12b8387475d64c622ac30f45c29c51
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
<font color="#4E9A06"><b>libin@oak</b></font>:<font color="#3465A4"><b>~</b></font>$ </pre>
推荐阅读
-
使用 winzip 生成的扩展名为 -ZIP 的压缩文件通常使用".zip "扩展名,其 MIME 格式为 application/zip。(推荐学习:phpstorm) 目前,ZIP 格式属于几种主流压缩格式之一,其竞争对手包括 RAR 格式和开源的 7z 格式。 从性能对比来看,RAR 和 7z 格式比 ZIP 格式压缩率更高,而 7-Zip 由于提供免费压缩工具而逐渐在更多领域得到应用。 微软从 Windows ME 操作系统开始就内置了对 zip 格式的支持,即使用户没有在电脑上安装解压软件,也可以打开和创建 zip 格式的压缩文件,OS X 和流行的 Linux 操作系统也提供了类似的 zip 格式支持。 因此,如果要在网络上传播和分发文件,zip 格式往往是最常见的选择。
-
iCloud 切换区域,中国区保留 appStore(更新)--自 2018 年 2 月 28 日起,中国区 iCloud 由云上贵州管理 苹果公司发布的公告 https://support.apple.com/zh-cn/HT208352 关键词 关键部分 受影响的 iCloud 账户:国家或地区设置为 "中国 "的 Apple ID。 iCloud 包含的服务照片、邮件、通讯录、日历、提醒事项、备忘、书签、钱包、钥匙串、云备份、云驱动器、应用程序数据 新条款和条件: 同意仅出于本协议允许的目的并在中国法律允许的范围内使用服务。 云桂洲在提供服务时应使用合理的技能并尽职尽责,但在适用法律允许的最大范围内,我们不保证或担保您通过本服务存储或访问的任何内容不会意外损坏、崩溃、丢失或根据本协议的条款被删除,如果发生此类损坏、崩溃、丢失或删除,我们不承担任何责任。您应自行负责维护您的信息和数据的适当备份。 Apple 和云上贵州有权访问您存储在服务中的所有数据,包括有权根据适用法律相互之间共享、交换和披露所有用户数据(包括内容)。 本协议的解释、效力和履行应适用*法律。对于因本协议引起的或与本协议有关的任何争议,云桂洲和您同意提交中国国际经济贸易仲裁委员会(CIETAC)根据提交仲裁时有效的法律在北京进行具有约束力的仲裁。 由云桂洲管理,用户选择: 停用; ID 到地区; 受 iCloud(由云桂洲运营)条款和条件约束 首先,我想说说我对数据安全的看法。 当我在朋友圈发布通知时,有些朋友回复说国外的操作并没有多安全,或者国外的安全只是相对于国外而言的等等。首先,我非常感谢这些朋友,这让我反思什么是数据安全。以下观点均属个人观点: 国外的月亮一定比国内圆? 这是一个根深蒂固的问题,只要有人说国外的东西比国内好,就会有人嘲笑崇洋媚外。我觉得我们在某些方面应该向国外学习,比如搜索引擎和版权问题。打开百度搜索 "数据安全",第一行肯定是广告。打开谷歌搜索 "数据安全",第一条就是 "数据安全_百度百科" .....各种版权问题大家都明白,支持正版,但不仅客户一心想找免费破解,就连作者也往往没有保护自己劳动成果或产品的想法。但从另一个层面来说,国内的发展和安全,甩国外几条街。没有说哪里好,哪里不好,辩证地去学习更好。 国外也有别有用心的数据泄露,谈何安全? 从加密解密的角度看,自古以来就没有绝对安全的加密,只有相对安全的做法。苹果的棱镜门、微软的 cpu 漏洞,各种参差不齐的被破解案例 ....是的,这的确是一个很好的论据,但凡事都不能只看一面,当年苹果面对FBI破解手机的要求,几经论证,苹果还是拒绝破解。这点拿到国内,只要上面的文件传达下去,还有企业敢说不吗?还敢说不吗? 关于这次iCloud数据迁移个人看法? 把数据迁移到贵州的云端,相当于把手机的所有数据都存储在贵州的云端服务器上。也许访问数据的速度会快很多,但我会把我的iCloud区放到美国,因为我不想数据存在云上贵州后经常接到莫名其妙的电话或短信,更不想因为乱用国外服务器而被请去喝茶。iCloud一个ID,即从中国账号转到美国区,主要用于数据存在美国服务器上。appStore一个ID,除了注册一个中国ID外,专门用来下载应用用,因为国外ID不支持酷狗和网易云等应用。麻烦的是,用了新的 appStore ID 后,当前的应用还得重新下载安装,因为旧的应用 ID 与新的应用 ID 不兼容,安装不了。最后,iCloud迁移后,国内用户使用美国服务器,估计要 "扶墙 "了。 专业步骤: 首先,进行appleID设置,这是前提条件,否则无法选择转移区域! 取消 appleID 的双重认证 取消家庭共享选项 二、窗口下载并安装 icloud 3.0 版
-
[姿势估计] 实践记录:使用 Dlib 和 mediapipe 进行人脸姿势估计 - 本文重点介绍方法 2):方法 1:基于深度学习的方法:。 基于深度学习的方法:基于深度学习的方法利用深度学习模型,如卷积神经网络(CNN)或递归神经网络(RNN),直接从人脸图像中学习姿势估计。这些方法能够学习更复杂的特征表征,并在大规模数据集上取得优异的性能。方法二:基于二维校准信息估计三维姿态信息(计算机视觉 PnP 问题)。 特征点定位:人脸姿态估计的第一步是通过特征点定位来检测和定位人脸的关键点,如眼睛、鼻子和嘴巴。这些关键点提供了人脸的局部结构信息,可用于后续的姿势估计。 旋转表示:常见的旋转表示方法包括欧拉角和旋转矩阵。欧拉角通过三个旋转角度(通常是俯仰、偏航和滚动)描述头部的旋转姿态。旋转矩阵是一个 3x3 矩阵,表示头部从一个坐标系到另一个坐标系的变换。 三维模型重建:根据特征点的定位结果,三维人脸模型可用于姿势估计。通过将人脸的二维图像映射到三维模型上,可以估算出人脸的旋转和平移信息。这就需要建立人脸的三维模型,然后通过优化方法将模型与特征点对齐,从而获得姿势估计结果。 特征点定位 特征点定位是用于检测人脸关键部位的五官基础部分,还有其他更多的特征点表示方法,大家可以参考我上一篇文章中介绍的特征点检测方案实践:人脸校正二次定位操作来解决人脸校正的问题,客户在检测关键点的代码上略有修改,坐标转换部分客户见上图 def get_face_info(image). img_copy = image.copy image.flags.writeable = False image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) results = face_detection.process(image) # 在图像上绘制人脸检测注释。 image.flags.writeable = True image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR) box_info, facial = None, None if results.detections: for detection in results. for detection in results.detections: mp_drawing.Drawing.detection = 无 mp_drawing.draw_detection(image, detection) 面部 = detection.location_data.relative_keypoints 返回面部 在上述代码中,返回的数据是五官(6 个关键点的坐标),这是用 mediapipe 库实现的,下面我们可以尝试用另一个库:dlib 来实现。 使用 dlib 使用 Dlib 库在 Python 中实现人脸关键点检测的步骤如下: 确保已安装 Dlib 库,可使用以下命令: pip install dlib 导入必要的库: 加载 Dlib 的人脸检测器和关键点检测器模型: 读取图像并将其灰度化: 使用人脸检测器检测图像中的人脸: 对检测到的人脸进行遍历,并使用关键点检测器检测人脸关键点: 显示绘制了关键点的图像: 以下代码将参数 landmarks_part 添加到要返回的关键点坐标中。
-
如何在 Ubuntu 20.04 上安装和使用 Docker
-
在 ubuntu 20.04 云服务器上安装 LXDE 轻量级桌面和 XRDP 远程连接工具
-
如何在 Ubuntu 上安装和使用 Nginx?
-
Docker] 在 Ubuntu 20 04-1 上配置 Docker 开发环境在 Ubuntu 20.04-1 上配置 Docker 开发环境 安装 Docker
-
在 Ubuntu 20.04 上使用 Jetson Orin Nano 编译和安装 ROS2 Foxy
-
在 ubuntu 20.04 下使用 CLion 2020.1.3 安装和配置 ROS 的详细说明
-
如何在 Ubuntu 20.04 上安装和配置 Redis