Docker   发布时间:2022-05-13  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了为什么“ https://get.docker.com/ubuntu”是一个apt存储库? 大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

今天,我已按照https://askubuntu.com/questions/472412/how-do-i-upgrade-docker的指示成功升级了docker.

但是,当我在浏览器中打开存储库URL https://get.docker.com/ubuntu/时,它只是一个文本页面,其中包含bash命令列表.

我的问题是:

> apt如何处理此文本页面网址?
> apt是否仅运行bash命令?
>如果是,为什么会有相同的
命令:

“ echo deb https://get.docker.com/ubuntu docker main> /etc/apt/sources.list.d/docker.list”

就像在
    https://askubuntu.com/questions/472412/how-do-i-upgrade-docker

最佳答案
位于https://get.docker.com/ubuntu/的页面包含一个可用于安装docker的脚本

# check that httpS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
    apt-get update
    apt-get install -y apt-transport-https
fi

# Add the repository to your APT sources
echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list

# Then import the repository key
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9

# Install docker
apt-get update
apt-get install -y lxc-docker

但是apt-get不使用此脚本,必须手动运行.

该脚本使用以下内容创建配置文件/etc/apt/sources.list.d/docker.list:

deb https://get.docker.com/ubuntu docker main

运行apt-get update时,将使用此配置文件,而Apt-get update将使用该行并从中建立以下URL

https://get.docker.com/ubuntu/dists/docker/main/binary-amd64/Packages

软件包管理系统的软件包高速缓存将使用“软件包”文件中描述的软件包进行更新.

Package: lxc-docker
Version: 1.5.0
License: Apache-2.0
vendor: none
Architecture: amd64
Maintainer: support@docker.com
Installed-Size: 0
Depends: lxc-docker-1.5.0
Homepage: http://www.docker.com/
Priority: extra
Section: default
Filename: pool/main/l/lxc-docker/lxc-docker_1.5.0_amd64.deb
Size: 2092
SHA256: 2e8b061216cc45343197e52082175bc671af298d530652436dc16d0397f986f0
SHA1: 24a0314bd7f6fdf79b69720de60be77510d689af
MD5sum: 923cad1a2af2d6b0a3e8fa909ba26ca4
Description: Linux container runtime Docker complements LXC with a high-level API which operates at the process level. It runs unix processes with strong guarantees of isolation and repeatability across servers. Docker is a great building block for automaTing diStributed systems: large-scale web deployments,database clusters,conTinuous deployment systems,private PaaS,service-oriented architectures,etc.
....

最后,apt-get upgrade将下载并安装软件包.

大佬总结

以上是大佬教程为你收集整理的为什么“ https://get.docker.com/ubuntu”是一个apt存储库? 全部内容,希望文章能够帮你解决为什么“ https://get.docker.com/ubuntu”是一个apt存储库? 所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:今天