fix(publish): accept short-form port mappings (fixes #13672)#13849
Open
Ijtihed wants to merge 1 commit into
Open
fix(publish): accept short-form port mappings (fixes #13672)#13849Ijtihed wants to merge 1 commit into
Ijtihed wants to merge 1 commit into
Conversation
|
i have one question regarding coverage: ports:
- "8080:80"
- "127.0.0.1:8080:80"
- "${PORT:-8080}:80"It may be worth adding or extending tests to cover a few representative short-form variants to ensure the publish path remains aligned with Compose port syntax support |
Signed-off-by: Ijtihed Kilani <ijtihedk@gmail.com>
c8cdd16 to
523c51c
Compare
Contributor
Author
Agree, done |
Contributor
Author
stephenlclarke
added a commit
to stephenlclarke/container-compose
that referenced
this pull request
Jul 12, 2026
Import Docker Compose-derived OCI artifact push helpers and YAML path replacement utilities for the publish slice. Upstream-Ref: docker/compose#13849 Bug-Ref: docker/compose#13672 Bug-Ref: docker/compose#13722 Release-Note: none
stephenlclarke
added a commit
to stephenlclarke/container-compose
that referenced
this pull request
Jul 12, 2026
Implement container compose publish for image-backed Compose projects with preflight validation, service image pushes, OCI project artifact manifests, env-file layers, dry-run planning, OCI version selection, and deterministic --yes bind-mount acceptance.
Refresh README, STATUS, release docs, parity docs, examples, and upstream handoff drafts so the documentation describes the current publish surface and remaining gaps without duplicated runtime pins.
Release-Highlight: container compose publish now pushes service images and creates Docker Compose OCI project artifacts for image-backed projects, including --dry-run planning, --oci-version 1.0/1.1/auto, --with-env env-file layers, --yes bind-mount acceptance, and short-form ports such as ${DASHBOARD_PORT:-3000}:3000. Upstream references: docker/compose#13849, docker/compose#13672, docker/compose#13722.
Upstream-Ref: docker/compose#13849
Bug-Ref: docker/compose#13672
Bug-Ref: docker/compose#13722
stephenlclarke
added a commit
to stephenlclarke/container-compose
that referenced
this pull request
Jul 12, 2026
Support container compose publish --resolve-image-digests by resolving service image tags after the service image push step and appending a Docker Compose-compatible image-digests.yaml override layer to the published OCI project artifact. Keep dry-run publish deterministic by running the existing preflight first, emitting the dry-run service image pushes, and only then producing the digest-resolved dry-run artifact plan. Refresh README, BUILD, STATUS, and publish handoff docs so parity and remaining publish gaps reflect the current surface. Release-Highlight: container compose publish --resolve-image-digests now adds Docker Compose-compatible image-digests.yaml layers so published OCI project artifacts can pin service images to registry digests after service image push. Upstream-Ref: docker/compose#13257 Upstream-Ref: docker/compose#13238 Upstream-Ref: docker/compose#13849 Refs: docker/compose#13672 Refs: docker/compose#13722
stephenlclarke
added a commit
to stephenlclarke/container-compose
that referenced
this pull request
Jul 12, 2026
Add Docker Compose-compatible publish prompts for bind mounts, sensitive-looking data, env declarations, literal config content, and optional missing env_file handling. The implementation keeps the raw YAML preflight path so pinned compose-go short-form port behavior remains compatible while publish prompts use a shared input reader. Sensitive findings are redacted in prompt output so the warning itself does not leak detected secret values. Release-Note: container compose publish now supports Docker-compatible interactive safety prompts for bind mounts, sensitive-looking data, env declarations, and literal config content; --yes accepts all publish prompts for CI. Upstream-Ref: docker/compose@eb4b1cc Upstream-Ref: docker/compose@9cd8442 Bug-Ref: docker/compose#13394 Refs: docker/compose#13722 Refs: docker/compose#13849
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
docker compose publishfailed with'services[whoami].ports[0]' expected a map or struct, got "string"when a service used short-form port syntax like${DASHBOARD_PORT:-3000}:3000.composeFileAsByteReaderusedLoadWithContextwhich decodes ports into typed Go structs which rejects short-form string entries. Switching toLoadModelWithContextreturns a raw map instead which in ths case avoids the struct decodeRelated issue
Fixes #13672