FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Docker Images
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Information Services
DevOps
Infrastructure
Docker Images
Commits
7620a2c3
Commit
7620a2c3
authored
2 weeks ago
by
Robin Goodall
Browse files
Options
Downloads
Patches
Plain Diff
feat: no parallelism for multiarch builds
parent
8caae0c4
No related branches found
No related tags found
1 merge request
!164
Non parallel multiarch
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build-and-push.gitlab-ci.yml
+1
-4
1 addition, 4 deletions
build-and-push.gitlab-ci.yml
prep-buildx.sh
+19
-0
19 additions, 0 deletions
prep-buildx.sh
with
20 additions
and
4 deletions
build-and-push.gitlab-ci.yml
+
1
−
4
View file @
7620a2c3
...
...
@@ -9,10 +9,7 @@
-
apk update
-
apk add bash gettext
# for envsubst command
-
apk add jq
# for querying manifests
# The official docs state that `docker buildx create --use` should be enough on its own. However, there appears to be
# a bug which, even though this issue is closed https://github.com/docker/buildx/issues/584#issuecomment-830041059,
# still requires this `docker run --rm` workaround.
-
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes ||
true
; docker buildx create --use
-
./prep-buildx.sh
script
:
-
./build.sh
variables
:
...
...
This diff is collapsed.
Click to expand it.
prep-buildx.sh
0 → 100755
+
19
−
0
View file @
7620a2c3
#! /bin/bash
set
-ex
# Change max-parallelism to 1 if building multiple archs
echo
"[worker.oci]"
>
/etc/buildkitd.toml
if
[[
$IMAGE_ARCHS
==
*
","
*
]]
;
then
echo
"Setting max-parallelism to 1 as building multiple archs"
echo
" max-parallelism = 1"
>>
/etc/buildkitd.toml
fi
# The official docs state that `docker buildx create --use` should be enough on its own. However, there appears to be
# a bug which, even though this issue is closed https://github.com/docker/buildx/issues/584#issuecomment-830041059,
# still requires this `docker run --rm` workaround.
docker run
--rm
--privileged
multiarch/qemu-user-static
--reset
-p
yes
||
true
;
docker buildx create
--config
/etc/buildkitd.toml
--use
docker buildx inspect
--bootstrap
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment