Comments (13)
I agree that should be the default behaviour, and not doing this is a bug.
podman build -t foobar
podman run foobar
Should work.
from podman.
can you replicate this outside devcontainers? like with a containerfile ?
from podman.
This looks like you did not fully specify the image name, just used a short name?
from podman.
@baude, I haven't tried, the issue seems to be short name resolution anyways.
@rhatdan, I did not specify anything, rather it's the devcontainer cli pulling from a locally built layer.
Is it wrong of me to assume that we should search locally first for short-names? I would've expected this if the image being pulled is of a conventional registry form (e.g. foo/bar
)... I guess it's all a repositories, slashes or not. Nonetheless, I would expect local-first search before asking for for registry selection.
Also, why isn't localhost/vsc-cli-*
an option? I can copy the string and run locally with
podman run --rm -it vsc-cli-*
I could post an issue to the devcontainer cli asking to prefix the image pull with localhost/
... 🤔
from podman.
Here's some sample output during devcontainer build
in the https://github.com/devcontainers/cli repo:
podman build -f /tmp/devcontainercli-person/updateUID.Dockerfile-0.65.0 -t vsc-cli-4ee3098167f24595df8161e2a6a226ab0bfe78567231ed22d21f0f0d45a5d006-uid --platform linux/amd64 --build-arg BASE_IMAGE=vsc-cli-4ee3098167f24595df8161e2a6a226ab0bfe78567231ed22d21f0f0d45a5d006 --build-arg REMOTE_USER=node --build-arg NEW_UID=1000 --build-arg NEW_GID=1000 --build-arg IMAGE_USER=node /tmp/devcontainercli-person/empty-folder
STEP 1/9: FROM vsc-cli-4ee3098167f24595df8161e2a6a226ab0bfe78567231ed22d21f0f0d45a5d006
? Please select an image:
▸ registry.fedoraproject.org/vsc-cli-4ee3098167f24595df8161e2a6a226ab0bfe78567231ed22d21f0f0d45a5d006:latest
registry.access.redhat.com/vsc-cli-4ee3098167f24595df8161e2a6a226ab0bfe78567231ed22d21f0f0d45a5d006:latest
docker.io/library/vsc-cli-4ee3098167f24595df8161e2a6a226ab0bfe78567231ed22d21f0f0d45a5d006:latest
from podman.
@vrothberg PTAL
from podman.
git clone -b feat/local-dev https://github.com/island-is/island.is
The branch doesn't exist anymore. I assume it has been merged?
from podman.
Here's some sample output during
devcontainer build
in the https://github.com/devcontainers/cli repo:
Works on my end. Did you configure /etc/containers/registries.conf? For instance, the short-name-mode option?
from podman.
Note: requires installing the podman-docker package as it seems that devcontainer shells out to the client rather than using the socket.
from podman.
The branch doesn't exist anymore
Yes, merged to main
. I updated the description.
Did you configure /etc/containers/registries.conf?
Hmm... It seems like, I did configure my registry.conf
:
# # An array of host[:port] registries to try when pulling an unqualified image, in order.
# unqualified-search-registries = ["example.com"]
unqualified-search-registries = ["registry.fedoraproject.org", "registry.access.redhat.com", "docker.io"]
Nonetheless, I'm would still expect localhost
to be searched for short-name image pulls.
from podman.
I added localhost
to the unqualified-search-registries
, and seems to have fixed the issue.
Again, I would like for localhost
to be searched even if it weren't in the list
from podman.
Should this also work?
podman build -t foobar
cat <<EOF >> Containerfile.dynamic
FROM foobar
RUN cowsay
EOF
podman build -f Containerfile.dynamic
I would expect so, but apparently it doesn't. This is what devcontainers does; builds an image, then uses it in a dynamically generated containerfile, which is what is causing this issue.
from podman.
$ cat /tmp/Containerfile
from alpine
run echo hi
$ podman build -t foobar /tmp
STEP 1/2: FROM alpine
STEP 2/2: run echo hi
--> Using cache f2222d280005d435f8debfcfdf9809893feeb0bad4f35504801017de87714622
COMMIT foobar
--> f2222d280005
Successfully tagged localhost/foobar:latest
f2222d280005d435f8debfcfdf9809893feeb0bad4f35504801017de87714622
$ podman images | grep foobar
localhost/foobar latest f2222d280005 2 minutes ago 8.09 MB
$ cat /tmp/Containerfile.dynamic
from foobar
run echo hi again
$ podman build -f /tmp/Containerfile.dynamic -t foobar1 /tmp
STEP 1/2: FROM foobar
STEP 2/2: run echo hi again
hi again
COMMIT foobar1
--> 68f7823fd0dc
Successfully tagged localhost/foobar1:latest
68f7823fd0dc5eae28725e908ffbc8fde549762490221b2469e59f48535dece7
podman images | grep foobar
localhost/foobar1 latest 68f7823fd0dc 3 minutes ago 8.09 MB
localhost/foobar latest f2222d280005 4 minutes ago 8.09 MB
from podman.
Related Issues (20)
- fatal error: runtime: netpoll failed HOT 1
- Restore qemu support on macOS optionally HOT 16
- CI: network bind: timeout HOT 1
- Podman 5.0.3 fails to start on M1 Mac
- Podman 5.0.3 fails to start on Mac Intel
- Next.js next build churns CPU forever in linux/amd64 container on arm64 silicon mac HOT 4
- Container systemd service unit starts before NFS
- Container systemd service unit depends on NFS Mounting HOT 4
- Podman wrongfully escapes special characters in env values HOT 1
- race: podman auto-update barfs when containers disappear HOT 3
- podman machine init: panic: nil pointer dereference
- completion: container diff: no such pod
- panic: invalid page type: 9: 10
- [MacOS 14.5]no space left on device HOT 7
- [RHEL8]Get the `Function not implemented` error by using `crun` runtime when building a multi-arch image HOT 2
- kube play, in parallel, leaves stray untagged pause images
- Netavark driver plugin cannot access host devices in rootless mode
- On MacOS with krunkit installed, the `run basic podman commands [It] Volume ops` test fails
- `podman image scp` should support local Unix sockets
- [podman/4.6.1, podman/4.9.4] Intermittent failure in playing kube file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from podman.