Allow setting architecture of containers#771
Allow setting architecture of containers#771AndrewFerr wants to merge 1 commit intomatrix-org:mainfrom
Conversation
Support creating containers of multi-platform images for an architecture other than that of the host running Complement.
|
These changes allowed me to run Complement tests locally on an (emulated) arm64 Synapse image, so I figured it'd be helpful to submit a PR for them. |
| containerName := fmt.Sprintf("complement_%s_%s_%s_%d", d.config.PackageNamespace, d.DeployNamespace, contextStr, counter) | ||
| deployment, err := deployImage( | ||
| d.Docker, img.ID, containerName, | ||
| d.Docker, img.ID, "", containerName, |
There was a problem hiding this comment.
Is an image ID tied to a particular architecture? If not, the correct arch has to be looked up here (and must consider the overrides per homeserver name).
| OS: "linux", | ||
| Architecture: imageArch, |
There was a problem hiding this comment.
Is hardcoding the OS here too rigid? Alternatively, the COMPLEMENT_BASE_ARCH could be BASE_PLATFORM and be a full <os>/<arch> string.
Nothing in particular; this PR was meant to work with Synapse's scripts-dev/complement.sh after being tweaked to build multi-platform images by putting |
|
It's been a while & this isn't important. Closing. |
Support creating containers of multi-platform images for an architecture other than that of the host running Complement.
Signed-off-by: Andrew Ferrazzutti andrewf@element.io
Pull Request Checklist