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 is not completely quiet #1897

Closed
TomSweeneyRedHat opened this issue Oct 5, 2019 · 2 comments
Closed

podman build -q is not completely quiet #1897

TomSweeneyRedHat opened this issue Oct 5, 2019 · 2 comments
Labels
from Podman This issue was either first reported on the Podman issue list or when running 'podman build' kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR

Comments

@TomSweeneyRedHat
Copy link
Member

Reported by @Romain-Geissler-1A in containers/podman#3191

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

Example:

# cat Dockerfile.http
FROM registry.access.redhat.com/ubi8/ubi:8.0

MAINTAINER Red Hat Training <[email protected]>
ENV DOCROOT=/var/www/html

RUN yum --disableplugin=subscription-manager --nodocs -y install httpd \
  && yum --disableplugin=subscription-manager clean all \
  && echo "Hello from the httpd-parent container!" > ${DOCROOT}/index.html

# Allows child images to inject their own content into DocumentRoot
ONBUILD COPY src/ ${DOCROOT}/

EXPOSE 80

CMD httpd -D FOREGROUND


# podman build --format=docker -t tom -q -f /root/Dockerfile.http .
--> Using cache b99dcb21a998701da6a1e7f94ea87830881f5394e09dedc2ae44c98eadf74228
--> Using cache dc2c989a735e62f27cfd9304e6d6fb742dce984098f3eca01722f71b2eb02d51
--> Using cache 8aeafcdcc3fa2d1e5d7ca346b1c23d0e408c49d908821702b560ac55c2f39231
--> Using cache e69cf420fa2517ff4a0d3f3cf6a4745c93062fa6a41a749a1bb2d201d5bffb15
--> Using cache ea872c5d8a5bb847d1bf0ae5080c15849a03cb5e33b5ff9f29198446a7a1ee57
--> Using cache f71b402b738dfca07b7545f1570962468187d6526cce27f0502f35cc9dbba432
f71b402b738dfca07b7545f1570962468187d6526cce27f0502f35cc9dbba432

@TomSweeneyRedHat TomSweeneyRedHat added kind/bug Categorizes issue or PR as related to a bug. from Podman This issue was either first reported on the Podman issue list or when running 'podman build' labels Oct 5, 2019
@TomSweeneyRedHat TomSweeneyRedHat changed the title podman build -q is not completely quiest podman build -q is not completely quiet Oct 5, 2019
tylarb added a commit to tylarb/buildah that referenced this issue Oct 15, 2019
  + Add a helper function inside of `(s *StageExecutor) Execute()` to
handle "using cache" messages

Authored-by: Tyler Ramer <[email protected]>

---
Addresses containers#1897
tylarb added a commit to tylarb/buildah that referenced this issue Oct 15, 2019
  + Add a helper function inside of `(s *StageExecutor) Execute()` to
handle "using cache" messages

Authored-by: Tyler Ramer <[email protected]>

---
Addresses containers#1897
tylarb added a commit to tylarb/buildah that referenced this issue Oct 15, 2019
  + Add a helper function inside of `(s *StageExecutor) Execute()` to
handle "using cache" messages

Authored-by: Tyler Ramer <[email protected]>

---
Addresses containers#1897
tylarb added a commit to tylarb/buildah that referenced this issue Oct 16, 2019
  + Add a helper function inside of `(s *StageExecutor) Execute()` to
handle "using cache" messages

Signed-off-by: Tyler Ramer <[email protected]>

---
Addresses containers#1897
rh-atomic-bot pushed a commit that referenced this issue Oct 16, 2019
  + Add a helper function inside of `(s *StageExecutor) Execute()` to
handle "using cache" messages

Signed-off-by: Tyler Ramer <[email protected]>

---
Addresses #1897

Closes: #1922
Approved by: rhatdan
tylarb added a commit to tylarb/buildah that referenced this issue Oct 17, 2019
  + Add a helper function inside of `(s *StageExecutor) Execute()` to
handle "using cache" messages

Signed-off-by: Tyler Ramer <[email protected]>

---
Addresses containers#1897
@tylarb
Copy link
Contributor

tylarb commented Oct 30, 2019

@TomSweeneyRedHat I added the "addresses issue" as post-comment in my commit (i.e. after final ---) - so it looks like this issue didn't get closed, even though the merged commit is clearly linked to the issue.

Probably this issue can be closed then.

@TomSweeneyRedHat
Copy link
Member Author

Thanks for the heads up @tylarb, this should have closed with the merge of #1922, closing now.

caiges pushed a commit to caiges/buildah that referenced this issue Nov 12, 2019
  + Add a helper function inside of `(s *StageExecutor) Execute()` to
handle "using cache" messages

Signed-off-by: Tyler Ramer <[email protected]>

---
Addresses containers#1897
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
from Podman This issue was either first reported on the Podman issue list or when running 'podman build' kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants