-
Notifications
You must be signed in to change notification settings - Fork 56
Allow setting architecture of containers #771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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. |
@@ -172,7 +177,7 @@ func (d *Deployer) Deploy(ctx context.Context, blueprintName string) (*Deploymen | |||
// TODO: Make CSAPI port configurable | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is hardcoding the OS here too rigid? Alternatively, the COMPLEMENT_BASE_ARCH
could be BASE_PLATFORM
and be a full <os>/<arch>
string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels rather niche, and can be solved in ways that don't expand the already huge API surface of Complement. What's stopping you from building arch-specific images and then referencing them as say homeserver-arm64:latest
?
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 |
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