Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix"convert --images" output to right format #9904

Merged
merged 1 commit into from Dec 1, 2022
Merged

Conversation

Windforce17
Copy link
Contributor

@Windforce17 Windforce17 commented Oct 10, 2022

Signed-off-by: Windforce17 42843391+Windforce17@users.noreply.github.com

What I did
According to docker images name rule: https://docs.docker.com/engine/reference/commandline/tag/#description docker compose convert --images should not contain underscores.

closes #9920

@laurazard laurazard requested review from a team, nicksieger, ndeloof, StefanScherer, ulyssessouza, glours, milas and laurazard and removed request for a team October 10, 2022 13:26
Copy link
Member

@milas milas left a comment

Choose a reason for hiding this comment

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

Thanks for the PR - good catch!

Left a comment re: the separator, as there is a global for this that gets set based on whether Compose is running in compatibility mode or not.

cmd/compose/convert.go Outdated Show resolved Hide resolved
@milas
Copy link
Member

milas commented Nov 29, 2022

Thanks for making the change - unfortunately, the new commit is missing DCO sign-off so isn't passing CI.

Rebase instructions @ https://github.com/docker/compose/pull/9904/checks?check_run_id=9738031634

@milas milas self-requested a review November 29, 2022 15:54
@@ -240,7 +240,7 @@ func runConfigImages(opts convertOptions, services []string) error {
if s.Image != "" {
fmt.Println(s.Image)
} else {
fmt.Printf("%s_%s\n", project.Name, s.Name)
fmt.Printf("%s\n", project.Name+api.Separator+s.Name)
Copy link
Contributor

Choose a reason for hiding this comment

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

as we already rely on Printf, better not use + to append strings

@ndeloof ndeloof enabled auto-merge (rebase) November 30, 2022 07:05
Signed-off-by: windforce17 <wzcboss@qq.com>
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] The actual created image and the image listed in docker compose config --images list different names
4 participants