compose build.context.additional_contexts should support another service image as the base image
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker-compose, go
- 领域
- build-system, cli
调研方向
从 nerdctl compose build 路径及其对 build.additional_contexts 的处理入手,使用所提供的 service:base 示例作为复现。将其解析方式与 Docker Compose 文档所述的依赖镜像行为进行比较,并验证依赖的 base 镜像可以作为 base_image 使用,而不会出现所示的本地路径错误。
由索引模型根据 Issue 内容生成。
描述
What is the problem you're trying to solve
I tried following example
services:
base:
image: base
build:
context: .
dockerfile: Base.containerfile
my-service:
image: base
build:
context: .
dockerfile: Service1.containerfile
additional_contexts:
base_image: service:base
[root@nginxunitlia test]# nerdctl compose build
INFO[0000] Building image base
[+] Building 2.8s (5/5) FINISHED
=> [internal] load build definition from Base.containerfile 0.0s
=> => transferring dockerfile: 121B 0.0s
=> [internal] load metadata for docker.io/library/almalinux:9 1.7s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/1] FROM docker.io/library/almalinux:9@sha256:e781633da358ff79d6ad69a080cfacbff5edd7f66473bcbd31105d1f2d977e5b 0.5s
=> => resolve docker.io/library/almalinux:9@sha256:e781633da358ff79d6ad69a080cfacbff5edd7f66473bcbd31105d1f2d977e5b 0.0s
=> => sha256:0f8a51a00283c0f5f6a29f00f346ec8ff4bc9349b54a5531d64e5065c576ac21 69.77MB / 69.77MB 0.5s
=> exporting to docker image format 1.0s
=> => exporting layers 0.0s
=> => exporting manifest sha256:e639a26a3199572d52498eb335e06e2da97499ef72c586bc3b9dc6e7f0be262f 0.0s
=> => exporting config sha256:ffbfe0e93c2675800088cc4ee24e58c71f9173a9df8dca942cd3977cf0739e69 0.0s
=> => sending tarball 0.5s
unpacking docker.io/library/base:latest (sha256:e639a26a3199572d52498eb335e06e2da97499ef72c586bc3b9dc6e7f0be262f)...
Loaded image: docker.io/library/base:latest
INFO[0005] Building image base
error: invalid local: resolve : lstat /root/containers/test/service:base: no such file or directory
FATA[0000] no image was built
FATA[0005] error while building image base: exit status 1
Describe the solution you'd like
To work like docker compose
Additional context
[root@nginxunitlia test]# nerdctl --version
nerdctl version 2.1.2
- 主要语言
- Go
- 星标
- 10.5k
- 派生
- 853
- 平均合并
- 6 天 14 小时
- 30 天内合并 PR
- 38
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
containerd/nerdctl 的其他 Issue
-
Test and examples: update wordpress images (to silence potential false security alerts)可能已有人在做 @Guurdeep 于 20 天前认领。 未关闭area/ci documentation priority/low
难度 2/5 1-3 小时 新手友好度 74/100
containerd/nerdctl#5283 · 2 条评论 ·
维护者通常 3 天内回复
-
`nerdctl kill` shouldn't set `containerd.io/restart.explicitly-stopped` label for non-stop signals可能重新可做 关联的 PR 已关闭且未合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
containerd/nerdctl#5171 · 3 条评论 ·
维护者通常 3 天内回复
-
area/project
难度 1/5 1 小时以内 新手友好度 25/100
containerd/nerdctl#5383 · 5 条评论 ·
维护者通常 3 天内回复
-
Restart-policy containers loop on "unable to apply apparmor profile" after reboot until the creating user logs in (OCI hook inherits the client's XDG_RUNTIME_DIR)可能已有人在做 @Shubhranshu153 今天认领。 未关闭area/rootless bug
难度 3/5 1-2 天 新手友好度 72/100
containerd/nerdctl#5377 · 已指派 1 人 ·
维护者通常 3 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
containerd/nerdctl#5355 ·
维护者通常 3 天内回复
查看 containerd/nerdctl 的全部 Issue
相似的 Issue
-
ready-for-agent
难度 2/5 1-3 小时 新手友好度 76/100
jordansmall/spindrift#7895 ·
维护者通常 1 天内回复
-
documentation priority: medium skill: intermediate status: ready for dev
难度 2/5 1-3 小时 新手友好度 83/100
hyperledger-labs/fabric-smart-client#2830 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
P3 tech debt
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复