Code Monkey home page Code Monkey logo

Comments (8)

q0rban avatar q0rban commented on August 10, 2024 1

The question is whether that docker save and load routines can be replaced by the tools that you use to manage the docker images.

Last time I checked, there wasn't a way to save an image to disk with docker buildx.

from docker-copyedit.

dkebler avatar dkebler commented on August 10, 2024 1

As of three weeks ago (and no simple way to do this) I opted to build my image from scratch instead of building from one with an unwanted VOLUME I then needed to remove using this tool. Still if I find another situation where I couldn't do that I'd revisit this. Thx anyway.

from docker-copyedit.

gdraheim avatar gdraheim commented on August 10, 2024

The script is in python but it depends a few external tools like "docker" and "tar" to save an image to disk and to unpack that archive. The question is whether that docker save and load routines can be replaced by the tools that you use to manage the docker images. Note that "podman" was designed as a drop-in replacement for the "docker" client command and it still showed problems. So.... if you can figure out how to save/load an image archive then it should work.

from docker-copyedit.

gdraheim avatar gdraheim commented on August 10, 2024

(no response)

from docker-copyedit.

gdraheim avatar gdraheim commented on August 10, 2024

If you can see the buildx results in "docker images" then all should be fine. If it uses containerd directly then check "ctr images" where ctr has also import/export commands. That's my best guess.

from docker-copyedit.

q0rban avatar q0rban commented on August 10, 2024

Okay, so I investigated this again. It is possible to save the built image to docker images with docker buildx using the --load option. The limitation for my use case is that it's not possible to build multi-platform images using the --load option. So, for the original requester, if you just want to build and alter an arm64 image on an amd64 machine, this is possible with buildx. However, I cannot figure out how to alter an arm64/amd64 (multi-platform) image. I can output a multi-platform in OCI format, but not docker image format. Or I can output individual images for each platform in docker image format, but I'm not sure if it's possible to then compile those distinct images into a single multi-platform image.

from docker-copyedit.

q0rban avatar q0rban commented on August 10, 2024

The one way I've thought about altering a multiplatform image is to run a local registry and push the multiplatform image from buildx to there, then pull the image from the local registry, save it, make the alterations, and load it.

from docker-copyedit.

q0rban avatar q0rban commented on August 10, 2024

One advantage to docker buildx, is that it seems that it's possible to skip the step of docker save by using --output type=docker,dest=- which outputs a docker image tarball:

docker buildx build --platform linux/arm64 --output type=docker,dest=- . | tar -C path/to/tmp -x
# perform alterations using manifest.json and config and then reload:
tar -C path/to/tmp -c . | docker load

from docker-copyedit.

Related Issues (13)

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.