Skip to content

cli/compose: accept numeric strings for long-form ports - #7450

Open
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:stack-quoted-ports
Open

locker95 wants to merge 1 commit into
docker:masterfrom
locker95:stack-quoted-ports

Conversation

@locker95

Copy link
Copy Markdown
Contributor

docker stack deploy rejects a long-form port when published or target is quoted. docker compose convert writes them that way, so a file compose is happy with fails on swarm with "must be a integer".

Numeric strings are parsed like integers. Anything that isn't a number still errors.

Fixes #1073

Comment thread cli/compose/loader/loader.go Fixed
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

compose convert quotes published and target, and stack deploy then
rejects the file. Treat those strings as integers.

Fixes docker#1073

Signed-off-by: Dean Chen <862469039@qq.com>
Sign up for free to 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.

Stack deploy fails if "target" or "published" port is a string

3 participants