从 gitlab 容器注册表中提取具有奇异性的 docker 图像时出错
Error pulling docker image with singularity from gitlab container registry
我正在尝试使用 singularity pull
从我的 Gitlab 容器注册表中提取一个 docker 图像(因为我想使用它的奇异性),但是我从奇异性中得到一个错误,告诉我一个文件不是 tar 存档。
实际上这个文件包含 <?xml version='1.0' encoding='UTF-8'?><Error><Code>AuthenticationRequired</Code><Message>Authentication required.</Message></Error>
.
有效的命令:docker pull registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master
。
失败的命令:singularity pull docker://registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master
问题是我的存储库是 public 并且每个人都可以读取它。那我错过了什么??
您应该能够从托管在 Docker 集线器上的 Docker 图像构建 Singularity 图像:
singularity build your-image.sif docker://maintainer/image:tag
因为这不是托管在 Docker hub 上的图像,但在 gitlab 上,构建命令应该使用 oras(OCI 注册表作为存储)地址。
在您的用例中,是这样的:
singularity pull preprocess-reads-master.sif oras://gitlab-registry/uit-sfb/metapipe/preprocess-reads:master
或者这个:
singularity pull preprocess-reads-master.sif oras://registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master
我能够 运行 singularity pull docker://registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master
没有问题,这表明存在环境或身份验证问题。如果设置了 SINGULARITY_DOCKER_USERNAME
或 SINGULARITY_DOCKER_PASSWORD
变量,奇点将尝试将它们用于 all docker 注册表。此外,如果您使用 singularity remote login docker://registry.gitlab.com
以及对该 repo/group 有效的 gitlab 凭据但没有容器注册表访问权限,您也会看到身份验证问题。
- 检查您配置的遥控器并注销给定注册表(如果列出)
singularity remote list
# Cloud Services Endpoints
# ========================
#
# NAME URI ACTIVE GLOBAL EXCLUSIVE INSECURE
# SylabsCloud cloud.sylabs.io YES YES NO NO
#
# Keyservers
# ==========
#
# URI GLOBAL INSECURE ORDER
# https://keys.sylabs.io YES NO 1*
#
# * Active cloud services keyserver
#
# Authenticated Logins
# =================================
#
# URI INSECURE
# docker://registry.gitlab.com NO
#
singularity remote logout docker://registry.gitlab.com
- 尝试运行在干净的环境中使用 pull 命令
env -i $(which singularity) pull docker://registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master
我正在尝试使用 singularity pull
从我的 Gitlab 容器注册表中提取一个 docker 图像(因为我想使用它的奇异性),但是我从奇异性中得到一个错误,告诉我一个文件不是 tar 存档。
实际上这个文件包含 <?xml version='1.0' encoding='UTF-8'?><Error><Code>AuthenticationRequired</Code><Message>Authentication required.</Message></Error>
.
有效的命令:docker pull registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master
。
失败的命令:singularity pull docker://registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master
问题是我的存储库是 public 并且每个人都可以读取它。那我错过了什么??
您应该能够从托管在 Docker 集线器上的 Docker 图像构建 Singularity 图像:
singularity build your-image.sif docker://maintainer/image:tag
因为这不是托管在 Docker hub 上的图像,但在 gitlab 上,构建命令应该使用 oras(OCI 注册表作为存储)地址。
在您的用例中,是这样的:
singularity pull preprocess-reads-master.sif oras://gitlab-registry/uit-sfb/metapipe/preprocess-reads:master
或者这个:
singularity pull preprocess-reads-master.sif oras://registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master
我能够 运行 singularity pull docker://registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master
没有问题,这表明存在环境或身份验证问题。如果设置了 SINGULARITY_DOCKER_USERNAME
或 SINGULARITY_DOCKER_PASSWORD
变量,奇点将尝试将它们用于 all docker 注册表。此外,如果您使用 singularity remote login docker://registry.gitlab.com
以及对该 repo/group 有效的 gitlab 凭据但没有容器注册表访问权限,您也会看到身份验证问题。
- 检查您配置的遥控器并注销给定注册表(如果列出)
singularity remote list
# Cloud Services Endpoints
# ========================
#
# NAME URI ACTIVE GLOBAL EXCLUSIVE INSECURE
# SylabsCloud cloud.sylabs.io YES YES NO NO
#
# Keyservers
# ==========
#
# URI GLOBAL INSECURE ORDER
# https://keys.sylabs.io YES NO 1*
#
# * Active cloud services keyserver
#
# Authenticated Logins
# =================================
#
# URI INSECURE
# docker://registry.gitlab.com NO
#
singularity remote logout docker://registry.gitlab.com
- 尝试运行在干净的环境中使用 pull 命令
env -i $(which singularity) pull docker://registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master