-
Notifications
You must be signed in to change notification settings - Fork 205
Description
Docker supports building an image for multiple platforms, amd64 and arm64 for example, and it even supports running containers using platform emulators, if they are installed. I have a project where I am building an image for both amd64 and arm64. I build both platforms on amd64 compute and publish a single image using multi-platform manifest. This is supported with buildx. Since there are some significant differences how the image is built for each platform, I would like to be able to test each platform to make sure they both function the same way. The only way I think I can do that right now is to run the tests for each platform on their respective architecture, which is not very practical. For example, if I want to test amd64, I need to run tests on amd64 compute. If I want to verify arm64, I need to run on arm64. If I could specify the platform to be used for container execution, that would solve this issue. Assumption is that I need to have a functioning docker environment that allows me to run an emulated environment. So, for example, if I can do this in my amd64 environment:
docker run --platform linux/arm64 fooThen it would be awesome to be able to do this:
container-structure-test test --platform linux/arm64 --image fooThe CLI option is very appealing since I would be able to reuse the same test config for all of the platforms I am building for.