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

podman build -q output prefixes image id with '--> '/'--> Using cache ' #3191

Closed
tmds opened this issue May 23, 2019 · 10 comments
Closed

podman build -q output prefixes image id with '--> '/'--> Using cache ' #3191

tmds opened this issue May 23, 2019 · 10 comments
Assignees
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@tmds
Copy link
Contributor

tmds commented May 23, 2019

Actual:

$ podman build -q .
--> 5b78988e87bbb00b4c8bb4307db5ff82a71a63ae54e51606032562ce35421997
$ podman build -q .
--> Using cache 5b78988e87bbb00b4c8bb4307db5ff82a71a63ae54e51606032562ce35421997

Expected: no prefix so the output is a directly usable image id.

podman v1.3.1.

@mheon
Copy link
Member

mheon commented May 23, 2019

@TomSweeneyRedHat PTAL

@TomSweeneyRedHat
Copy link
Member

@tmds can you share the Dockerfile that you used? I don't have a v1.3.1 handy, but using this Dockerfile:

# cat Dockerfile.busybox
FROM busybox
# podman version 
Version:            1.3.1-dev
RemoteAPI Version:  1
Go Version:         go1.12.2
Git Commit:         2bb1487a00d23bb38314b7d7ee861952b7c6517e-dirty
Built:              Thu May 16 12:05:18 2019
OS/Arch:            linux/amd64

I'm not seeing the error in upstream.

# podman build -q -f ~/Dockerfile.busybox .
--> 64f5d945efcc0f39ab11b3cd4ba403cc9fefe1fa3613123ca016cf3708e8cafb
# podman build -q -f ~/Dockerfile.busybox .
--> 64f5d945efcc0f39ab11b3cd4ba403cc9fefe1fa3613123ca016cf3708e8cafb

I think, but can't swear to it that this was a fix not too long ago, but I thought it would have been in v1.3.1.

@TomSweeneyRedHat TomSweeneyRedHat self-assigned this May 23, 2019
@tmds
Copy link
Contributor Author

tmds commented May 23, 2019

@TomSweeneyRedHat it is not failing. The output format is not matching my expectations:

Instead of:

--> 64f5d945efcc0f39ab11b3cd4ba403cc9fefe1fa3613123ca016cf3708e8cafb

My expectation (based on docker cli) is there to be no prefix:

64f5d945efcc0f39ab11b3cd4ba403cc9fefe1fa3613123ca016cf3708e8cafb

@TomSweeneyRedHat
Copy link
Member

@tmds
Thanks for the explanation. I though the issue was the first had --> and the second had --> Using cache.

@rhatdan @nalind WDYT about droppnig the prefix entirely?

@rhatdan
Copy link
Member

rhatdan commented May 23, 2019

Yes I agree we should not do the -->

@tmds
Copy link
Contributor Author

tmds commented Jun 11, 2019

@TomSweeneyRedHat will this be implemented in one of the next releases?

@TomSweeneyRedHat
Copy link
Member

@tmds thanks for the reminder. Let me see if I can crank this out quickly, I'd set it aside for other fires.

TomSweeneyRedHat added a commit to TomSweeneyRedHat/buildah that referenced this issue Jun 11, 2019
Remove the `-->` from in front of the imageID that's printed in
the last line of output from a `buildah bud` command.

Fixes: containers/podman#3191

Signed-off-by: TomSweeneyRedHat <[email protected]>
pkubatrh added a commit to pkubatrh/container-common-scripts that referenced this issue Aug 6, 2019
pkubatrh added a commit to pkubatrh/container-common-scripts that referenced this issue Sep 5, 2019
pkubatrh added a commit to sclorg/container-common-scripts that referenced this issue Sep 10, 2019
@Romain-Geissler-1A
Copy link
Contributor

Hi,

Still, the output of "podman build -q" doesn't match the output of "docker build -q":

  • docker outputs a single line (the final image id), while podman show all intermediate image ids
  • podman prefixes it with "Using cache" when the cache was used, whereas docker only outputs the image id and nothing else.

Is it possible to match the docker output ? It's quite handy to easily fetch an image id with:
DOCKER_IMAGE_ID="$(docker build -q .)"
while with podman currently we need to filter output to have the same result.

Cheers,
Romain

@tmds
Copy link
Contributor Author

tmds commented Oct 5, 2019

@Romain-Geissler-1A can you create a new issue?

@TomSweeneyRedHat
Copy link
Member

@Romain-Geissler-1A that should be quiet and I thought it was. Me thinks we've had a change somewhere to not make it quiet any more. Drat! Thanks for the heads up. As this is build issue, I've created a new issue under Buildah and tried to tag you in it so you can follow.

containers/buildah#1897

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants