Git Product home page Git Product logo

Comments (13)

baude avatar baude commented on June 9, 2024

@vrothberg what say you?

from podman.

vrothberg avatar vrothberg commented on June 9, 2024

Please share a full reproducer. Based on the description I am unable to reproduce.

from podman.

soiamsoNG avatar soiamsoNG commented on June 9, 2024

create Dockerfile

FROM alpine:latest
CMD ["echo","hello world"]

follow below step

  1. podman pull docker.io/alpine:latest
  2. podman inspect alpine      (get the architecture info as amd64)
  3. podman --arch amd64 --file Dockerfile      (the prompt of registry select show up)
  4. podman --file Dockerfile       (the prompt of registry will not show up)

step 3 and 4 same Dockerfile different behavior

from podman.

rhatdan avatar rhatdan commented on June 9, 2024

podman build --arch amd64 --file Dockerfile (the prompt of registry select show up)
podman build --file Dockerfile (the prompt of registry will not show up)

I think you meant, this looks like it might be the same issue as:

containers/buildah#5478

from podman.

rhatdan avatar rhatdan commented on June 9, 2024

Could you try --platform linux/amd64 to see if it fixes your issue.

from podman.

soiamsoNG avatar soiamsoNG commented on June 9, 2024

--platform linux/amd64 not fix the issue ,the prompt of registry select show up

from podman.

vrothberg avatar vrothberg commented on June 9, 2024

It works exactly as designed. Once you have selected an image and it's pulled down, the selection is being recorded.

See https://www.redhat.com/sysadmin/container-image-short-names for details on the behavior.

from podman.

soiamsoNG avatar soiamsoNG commented on June 9, 2024

maybe I made you miss understand, step 3 and step 4 can be exchange the order, and same difference behavior.
step 1 , step 2 , step 4 never give us any select prompt.

from podman.

vrothberg avatar vrothberg commented on June 9, 2024

Which system are you running on? If there's a recorded alias, there will be no prompt.

from podman.

soiamsoNG avatar soiamsoNG commented on June 9, 2024

fedora 39, podman version 4.9.4,

the post you provide said below but I never find this file
Podman will automatically record a new short-name alias in the users $HOME/.config/containers/short-name-aliases.conf file

and please take a detail look at below workaround for this issue, it still will search local/localbuildimage but not at the first, it prompt first if there is more than one registry even with local match.
microsoft/vscode-remote-release#9748 (comment)

May be this issue title not match the exact issue. may be re-title to will not lookup local image first.

from podman.

vrothberg avatar vrothberg commented on June 9, 2024

Fedora 39 ships with /etc/containers/registries.conf.d/000-shortnames.conf which has an alias for alpine, so pulling this image will never show a prompt.

and please take a detail look at below workaround for this issue, it still will search local/localbuildimage but not at the first, it prompt first if there is more than one registry even with local match.
microsoft/vscode-remote-release#9748 (comment)

I need an exact reproducer. Sorry, I am a bit lost in what the problem is.

I am sure we'll get to the bottom of the issue.

from podman.

soiamsoNG avatar soiamsoNG commented on June 9, 2024

Just update to fedora 40, podman version 5.0.1

find alpine in /etc/containers/registries.conf.d/000-shortnames.conf

Sorry can't let you you get to reproducer I refind the step description to below

make sure more than one registry by below command

podman info -f json | jq '.registries["search"]'

Dockerfile

FROM alpine:latest
CMD ["echo","hello world"]

Dockerfile2

FROM localalpine:latest
CMD ["echo","hello world2"]

prompt will not come out with below step (I think it can find image localalpine )

podman pull alpine:latest
podman build --file Dockerfile -t localalpine
podman build --file Dockerfile2 -t locallocalalpine

prompt will show at the third step of below (don't know why image localalpine alreay in local and prompt show behavior not as above three step, but you can force it to fallback to use local image by limit remote registry to only one)

podman pull alpine:latest
podman build --file Dockerfile -t localalpine
podman build --arch amd64 --file Dockerfile2 -t locallocalalpine

from podman.

vrothberg avatar vrothberg commented on June 9, 2024

Thanks a lot for providing the reproducer. It's essentially the same issue as #17063. #12682 gives some important context as well.

from podman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.