搜索旧的分发Linux容器

时间:2018-03-16 16:58:05

标签: docker

我需要使用旧的32位版Centos镜像并在我的Ubuntu系统上运行容器。

我搜索Centos:

sudo docker search centos

找到候选人:

NAME                               DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
centos                             The official build of CentOS.                   4100                [OK]                

下载并运行它:

sudo docker run centos
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
5e35d10a3eba: Pull complete 
Digest: sha256:dcbc4e5e7052ea2306eed59563da1fec09196f2ecacbe042acbdcd2b44b05270
Status: Downloaded newer image for centos:latest

但我不需要最新的中心。我想获得可用的旧Centos图像列表。

如何获取容器的Centos 6.9图像?

1 个答案:

答案 0 :(得分:0)

您可以使用以下命令获取官方CentOS 64位图像的可用标记列表:

curl -s https://registry.hub.docker.com/v1/repositories/centos/tags | jq '.[] | (.name)' | awk -F'"' '{print $2}'

输出显示CentOS图像带有标记centos6.9

现在您可以使用以下内容运行容器:

docker run -ti centos:centos6.9 bash

您还可以获得官方CentOS 32位图像的可用标签列表:

curl -s https://registry.hub.docker.com/v1/repositories/i386/centos/tags | jq '.[] | (.name)' | awk -F'"' '{print $2}'
6
centos6

似乎是一个拥有CentOS 32位版本的官方存储库。无论如何,你可以尝试用它来启动容器。

相关问题