Comments (8)
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.
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.
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.
(no response)
from docker-copyedit.
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.
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.
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.
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)
- Tabs/spaces broken HOT 1
- Python 3 support? HOT 4
- Manifest file already exists HOT 3
- Manifest not found HOT 4
- set-label causes TypeError on images with no existing labels HOT 1
- can't set architecture variant HOT 2
- Copyedit script no longer executable HOT 1
- Removing ports doesn't work HOT 2
- remove all volumes doesn't work HOT 10
- STDERR: invalid tag HOT 2
- speed up docker save process HOT 1
- dockerize you application HOT 2
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 docker-copyedit.