ops icon indicating copy to clipboard operation
ops copied to clipboard

create pkg from-docker OCI registry other than dockerhub

Open tuananh opened this issue 10 months ago • 7 comments

I haven't dug into the code yet but looks like I can't create pkg from-docker using OCI registry other than dockerhub.

for example, i create a local image, push it to ttl.sh (a temporary OCI registry)

however, I'm unable to load it

ops pkg from-docker ttl.sh/tuananh/node:2h
no loader found - trying others
ttl.sh/tuananh/node_2h

same if i tried with chainguard node image cgr.dev/chainguard/node:latest-dev or a distroless image ops pkg from-docker gcr.io/distroless/python3-debian12:debug

ops should be able to create pkg from any OCI registry.

tuananh avatar Mar 02 '25 17:03 tuananh

maybe it's not the registry but sth else. no loader found - trying others seems to be caused by ldfound = false

tuananh avatar Mar 02 '25 17:03 tuananh

so these are a little bit different than docker images

you'll need to specify what program you are trying to extract as nanos only runs one but many docker images will have a ton of executables even if they are not used

ops pkg from-docker ttl.sh/tuananh/node:2h --file node

eyberg avatar Mar 02 '25 18:03 eyberg

so these are a little bit different than docker images

you'll need to specify what program you are trying to extract as nanos only runs one but many docker images will have a ton of executables even if they are not used

ops pkg from-docker ttl.sh/tuananh/node:2h --file node

that's probably it. lemme try it and get back.

tuananh avatar Mar 03 '25 08:03 tuananh

it works. thank you.

tuananh avatar Mar 03 '25 12:03 tuananh

Image

while it seems to work, not sure why the pkg is not listed with ops pkg list --local

tuananh avatar Mar 03 '25 12:03 tuananh

this is cause we need to include the registry as part of the namespace or ignore it - this is really the only part of ops that uses this, we can take a look

eyberg avatar Mar 03 '25 15:03 eyberg

yeah if i move the folder to .local_packages top level, it will show up

tuananh avatar Mar 04 '25 13:03 tuananh