Skip to content

allow usage of -f flag with oci Compose artifact - #12220

Merged
glours merged 1 commit into
docker:mainfrom
glours:load-oci-artifact
Oct 25, 2024
Merged

allow usage of -f flag with oci Compose artifact#12220
glours merged 1 commit into
docker:mainfrom
glours:load-oci-artifact

Conversation

@glours

@gloursglours commented Oct 18, 2024

Copy link
Copy Markdown
Contributor

What I did

Related issue

https://docker.atlassian.net/browse/COMP-809
closes#10360

(not mandatory) A picture of a cute animal, if possible in relation to what you did

@glours
gloursforce-pushed the load-oci-artifact branch 4 times, most recently from 47ccb93 to ba858c8CompareOctober 22, 2024 12:38
@codecov

codecovBot commented Oct 22, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 12.50000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 50.79%. Comparing base (d9df7aa) to head (ba858c8).
Report is 22 commits behind head on main.

Files with missing linesPatch %Lines
pkg/compose/push.go0.00%2 Missing and 1 partial ⚠️
pkg/remote/oci.go0.00%2 Missing ⚠️
internal/ocipush/push.go0.00%1 Missing ⚠️
pkg/compose/publish.go0.00%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #12220 +/- ##
==========================================
- Coverage 51.10% 50.79% -0.31% 
==========================================
Files 149 152 +3 Lines 14537 14794 +257 ==========================================
+ Hits 7429 7515 +86 - Misses 6356 6514 +158 - Partials 752 765 +13 
FlagCoverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glours
gloursforce-pushed the load-oci-artifact branch 7 times, most recently from e065212 to c61690cCompareOctober 25, 2024 09:10
@glours
glours marked this pull request as ready for review October 25, 2024 09:27
@glours
glours requested review from a team, jhrotko and ndeloof and removed request for a teamOctober 25, 2024 09:28
Comment threadgo.mod Outdated
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/compose-spec/compose-go/v2 => github.com/glours/compose-go/v2 v2.0.0-20241023174721-0f71bc7922c4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can point to compose-go HEAD as your PR was merged

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
@glours
glours merged commit 26064d4 into docker:mainOct 25, 2024
Comment threadpkg/compose/push.go
for _, service := range project.Services {
if service.Build == nil || service.Image == "" {
if options.ImageMandatory && service.Image == "" {
return fmt.Errorf("%q attribut is mandatory to push an image for service %q", "service.image", service.Name)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/attribut/attribute/g

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 21, 2024
This MR contains the following updates:
| Package | Update | Change |
|---|---|---|
| [docker/compose](https://github.com/docker/compose) | minor | `v2.29.7` -> `v2.30.3` |
MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).
**Proposed changes to behavior should be submitted there as MRs.**
---
### Release Notes
<details>
<summary>docker/compose (docker/compose)</summary>
### [`v2.30.3`](https://github.com/docker/compose/releases/tag/v2.30.3)
[Compare Source](docker/compose@v2.30.2...v2.30.3)
#### What's Changed
##### 🐛 Fixes
- Avoid starting all services on rebuild by [@&#8203;jhrotko](https://github.com/jhrotko) [(12258)](docker/compose#12258)
##### ⚙️ Dependencies
- Bump compose-go v2.4.4 by [@&#8203;glours](https://github.com/glours) [(12274)](docker/compose#12274)
**Full Changelog**: docker/compose@v2.30.2...v2.30.3
### [`v2.30.2`](https://github.com/docker/compose/releases/tag/v2.30.2)
[Compare Source](docker/compose@v2.30.1...v2.30.2)
#### What's Changed
##### 🐛 Fixes
- Service being declared in a profile must not trigger re-creation by [@&#8203;ndeloof](https://github.com/ndeloof) in [(12265)](docker/compose#12265)
- Remove ArtifactType from Config in OCI v1.1 definition of the artifact by [@&#8203;glours](https://github.com/glours) [(12266)](docker/compose#12266)
##### 🔧 Internal
- Add Joana Hrotko to Maintainers by [@&#8203;laurazard](https://github.com/laurazard) [(12253)](docker/compose#12253)
- Add profile e2e test case to document in compose by [@&#8203;jhrotko](https://github.com/jhrotko) [(12252)](docker/compose#12252)
##### ⚙️ Dependencies
- Bump `compose-go` to version `v2.4.3` by [@&#8203;glours](https://github.com/glours) in docker/compose#12261
**Full Changelog**: docker/compose@v2.30.1...v2.30.2
### [`v2.30.1`](https://github.com/docker/compose/releases/tag/v2.30.1)
[Compare Source](docker/compose@v2.30.0...v2.30.1)
#### What's Changed
##### 🐛 Fixes
Fix regression when using stdin as input of `-f` flag [(12248)](docker/compose#12248)
Fix regression when using multiple time the same YAML anchor in a Compose file [(12247)](docker/compose#12247)
##### ⚙️ Dependencies
- bump compose-go to version v2.4.2 by [@&#8203;glours](https://github.com/glours) in docker/compose#12249
**Full Changelog**: docker/compose@v2.30.0...v2.30.1
### [`v2.30.0`](https://github.com/docker/compose/releases/tag/v2.30.0)
[Compare Source](docker/compose@v2.29.7...v2.30.0)
#### What's Changed
##### ✨ Improvements
- Introduce service hooks by [@&#8203;ndeloof](https://github.com/ndeloof) [(12166)](docker/compose#12166)
- Introduce generate command as alpha command by [@&#8203;glours](https://github.com/glours) [(12209)](docker/compose#12209)
- Add export command by [@&#8203;jarqvi](https://github.com/jarqvi) [(12120)](docker/compose#12120)
- Add support for CDI device request using `devices` by [@&#8203;ndeloof](https://github.com/ndeloof) [(12184)](docker/compose#12184)
- Add support for bind recursive by [@&#8203;ndeloof](https://github.com/ndeloof) [(12210)](docker/compose#12210)
- Allow usage of `-f` flag with OCI Compose artifacts by [@&#8203;glours](https://github.com/glours) [(12220)](docker/compose#12220)
##### 🐛 Fixes
- Append unix-style relative path when computing container target path by [@&#8203;ndeloof](https://github.com/ndeloof) [(12145)](docker/compose#12145)
- Wait for dependent service up to delay set by --wait-timeout by [@&#8203;ndeloof](https://github.com/ndeloof) [(12156)](docker/compose#12156)
- Check secret source exists, as bind mount would create target by [@&#8203;ndeloof](https://github.com/ndeloof) [(12151)](docker/compose#12151)
- After container restart register printer consumer by [@&#8203;jhrotko](https://github.com/jhrotko) [(12158)](docker/compose#12158)
- Fix(down): Fix down command if specified services are not running by [@&#8203;idsulik](https://github.com/idsulik) [(12164)](docker/compose#12164)
- Show watch error message and open DD only when w is pressed by [@&#8203;jhrotko](https://github.com/jhrotko) [(12165)](docker/compose#12165)
- Fix(push): Fix unexpected EOF on alpha publish by [@&#8203;idsulik](https://github.com/idsulik) [(12169)](docker/compose#12169)
- Fix(convergence): Serialize access to observed state by [@&#8203;anantadwi13](https://github.com/anantadwi13) [(12150)](docker/compose#12150)
- Remove feature flag integration with Docker Desktop for ComposeUI and ComposeNav by [@&#8203;jhrotko](https://github.com/jhrotko) [(12192)](docker/compose#12192)
- Support Dockerfile-specific ignore-file with watch by [@&#8203;ndeloof](https://github.com/ndeloof) [(12193)](docker/compose#12193)
- Add support for raw env_file format by [@&#8203;ndeloof](https://github.com/ndeloof) [(12179)](docker/compose#12179)
- Convert GPUs to DeviceRequests with implicit "gpu" capability by [@&#8203;ndeloof](https://github.com/ndeloof) [(12197)](docker/compose#12197)
- Improve error message to include expected network label by [@&#8203;divinity76](https://github.com/divinity76) [(12213)](docker/compose#12213)
- Don't use progress to render restart, which hides logs by [@&#8203;ndeloof](https://github.com/ndeloof) [(12226)](docker/compose#12226)
- One-off containers are not indexed, and must be ignored by `exec --index` command by [@&#8203;ndeloof](https://github.com/ndeloof) [(12224)](docker/compose#12224)
- Don't warn about uid/gid not being supported while ... they are by [@&#8203;ndeloof](https://github.com/ndeloof) [(12232)](docker/compose#12232)
- Connect to external networks by name by [@&#8203;ndeloof](https://github.com/ndeloof) [(12234)](docker/compose#12234)
- Fix push error message typo by [@&#8203;chris-crone](https://github.com/chris-crone) [(12237)](docker/compose#12237)
- Fix(dockerignore): Add wildcard support to dockerignore.go by [@&#8203;idsulik](https://github.com/idsulik) [(12239)](docker/compose#12239)
##### 🔧 Internal
- Remove bind options when creating a volume type by [@&#8203;jhrotko](https://github.com/jhrotko) [(12177)](docker/compose#12177)
- pass device.options to engine by [@&#8203;ndeloof](https://github.com/ndeloof) [(12183)](docker/compose#12183)
- Add security policy by [@&#8203;thaJeztah](https://github.com/thaJeztah) [(12194)](docker/compose#12194)
- Gha: set default permissions to "contents: read" by [@&#8203;thaJeztah](https://github.com/thaJeztah) [(12195)](docker/compose#12195)
- Desktop: allow this client to be identified via user-agent by [@&#8203;djs55](https://github.com/djs55) [(12212)](docker/compose#12212)
- Compose-go clean volume target to avoid ambiguous comparisons by [@&#8203;ndeloof](https://github.com/ndeloof) [(12208)](docker/compose#12208)
##### ⚙️ Dependencies
- Bump docker `v27.3.1` by [@&#8203;ndeloof](https://github.com/ndeloof) [(12178)](docker/compose#12178)
- Build(deps): bump `golang.org/x/sys` from `0.25.0` to `0.26.0` by [@&#8203;dependabot](https://github.com/dependabot) [(12189)](docker/compose#12189)
- Bump `compose-go` to `v2.3.0` by [@&#8203;glours](https://github.com/glours) [(12198)](docker/compose#12198)
- Bump `compose-go` to `v2.4.0` by [@&#8203;glours](https://github.com/glours) [(12231)](docker/compose#12231)
- Bump `compose-go` to `v2.4.1` by [@&#8203;glours](https://github.com/glours) [(12243)](docker/compose#12242)
- Build(deps): bump github.com/containerd/containerd from 1.7.22 to 1.7.23 by [@&#8203;dependabot](https://github.com/dependabot) [(12211)](docker/compose#12211)
- Bump golang minimal version to `1.22` in go.mod by [@&#8203;glours](https://github.com/glours) [(12246)](docker/compose#12246)
- Bump `go.uber.org/mock` to `v0.5.0` and `google.golang.org/grpc` to `v1.67.1` by [@&#8203;glours](https://github.com/glours) [(12245)](docker/compose#12245)
#### New Contributors
- [@&#8203;anantadwi13](https://github.com/anantadwi13) made their first contribution in docker/compose#12150
- [@&#8203;jarqvi](https://github.com/jarqvi) made their first contribution in docker/compose#12120
- [@&#8203;djs55](https://github.com/djs55) made their first contribution in docker/compose#12212
- [@&#8203;divinity76](https://github.com/divinity76) made their first contribution in docker/compose#12213
**Full Changelog**: docker/compose@v2.29.7...v2.30.0
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this MR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box
---
This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
@glours
glours deleted the load-oci-artifact branch June 30, 2025 21:22
stephenlclarke added a commit to stephenlclarke/container-compose that referenced this pull request Jul 12, 2026
Bring in the Docker Compose OCI project artifact resolver and loader behavior behind the compose-normalizer remote loader boundary.
Upstream-Ref: docker/compose#12220
Upstream-Ref: docker/compose#12289
Upstream-Ref: docker/compose#13311
Upstream-Ref: docker/compose#13574
Release-Highlight: container compose can load Docker Compose OCI project artifact layers through the upstream-derived OCI loader. Upstream references: docker/compose#12220, docker/compose#12289, docker/compose#13311, docker/compose#13574.
stephenlclarke added a commit to stephenlclarke/container-compose that referenced this pull request Jul 12, 2026
Register the OCI resource loader for config, variables, and Bridge model loading, and refresh current parity docs for project-source support.
Upstream-Ref: docker/compose#12220
Upstream-Ref: docker/compose#12289
Upstream-Ref: docker/compose#13311
Upstream-Ref: docker/compose#13574
Release-Highlight: container compose -f oci://... now loads Docker Compose OCI project artifacts, including Compose YAML layers, env-file layers, image-index wrappers, and traversal-safe cached materialization. Upstream references: docker/compose#12220, docker/compose#12289, docker/compose#13311, docker/compose#13574.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding support for https-based remote URL addresses in docker compose.

3 participants

@glours@ndeloof@chris-crone