mirror of
https://github.com/spr-networks/super.git
synced 2026-04-24 20:35:55 +03:00
[PR #49] [MERGED] [build] Use buildx bake to make multi-platform images #274
Labels
No labels
blocked
bug
documentation
enhancement
fixed
fixed ✅
hardening
implemented
installer
multicast
p1
p2
pending
podman
pull-request
security
testing
v1
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/super#274
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/spr-networks/super/pull/49
Author: @rgov
Created: 8/10/2022
Status: ✅ Merged
Merged: 8/12/2022
Merged by: @lts-rad
Base:
main← Head:rzg/buildx-bake📝 Commits (9)
1304573[ui] [build] Build the frontend for the native architecture1c1def8[ui] [build] Only copy build products to container image0b82875[build] Fix typo in argument9deb55a[build] Use buildx bake to make multi-platform imagese25fc39[build] Build container images on all commits729508a[build] Do not pull frontend before build5dc7f3c[build] Make ramfs optional23ca318[build] Update instructions in READMEcfaf277[ui] [build] Increase timeout for yarn install📊 Changes
15 files changed (+100 additions, -55 deletions)
View changed files
📝
.github/workflows/docker-image.yml(+6 -13)📝
README.md(+6 -5)📝
api/Dockerfile(+4 -1)📝
api_sample_plugin/Dockerfile(+4 -1)📝
build_docker_compose.sh(+29 -15)📝
dhcp/Dockerfile(+5 -3)📝
dns/Dockerfile(+4 -2)📝
dyndns/Dockerfile(+5 -3)📝
flowgather/Dockerfile(+4 -1)📝
frontend/Dockerfile(+9 -3)📝
multicast_udp_proxy/Dockerfile(+8 -4)📝
plugin-lookup/Dockerfile(+4 -1)📝
superd/Dockerfile(+4 -1)📝
wifid/Dockerfile(+4 -1)📝
wireguard/Dockerfile(+4 -1)📄 Description
An experiment to build multi-platform images in CI.
Multi-platform images in Docker are kind of a mess. You have to build them with a
buildxbuilder. In this patch I modifiedbuild_docker_compose.shto usebuildx bakewhich is thebuildxequivalent ofdocker compose.Unfortunately, unlike
docker build, withbuildx buildthe resulting images are not automatically exposed underdocker images, but you can pass--loadto copy them over. Except,--loadonly works for single-platform images! So if you are building a multi-platform image, you pretty much have to push it directly to the registry. This is fine in CI, since that's probably what you want anyway, but it sucks for local development.So I taught
build_docker_compose.shto determine if it is doing a single-platform build, and if so, it will automatically--loadit into the local Docker image list.Also, it doesn't attempt to push to the registry for pull requests, so contributed pull requests (like this one!) won't fail for lack of permissions.
This stacks on top of #48 and reimplements part of #30 (without the caching part).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.