我是Docker的新手。我克隆了GitHub项目,并试图通过运行来创建映像
docker build -t imagename .
但它给出了一个错误:
username@LAPTOP-MMMMBU:~/myfolder/test$ docker build -t newimage .
[+] Building 10.8s (3/3) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 38B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for registry.abcd.org/test:base 10.8s
------
> [internal] load metadata for registry.abcd.org/test:base:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code [manifests base]: 401 Unauthorized
在此处插入凭据的位置(用户/密码(。
请帮忙。
如果您询问如何向提取基本映像的docker注册表进行身份验证,您可以运行docker login registry.abcd.org
,并在提示时输入用户名和密码。然后,您的后续构建命令将能够提取图像。
docker login [OPTIONS] [SERVER]
https://docs.docker.com/engine/reference/commandline/login/