-
Notifications
You must be signed in to change notification settings - Fork 533
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
[WIP] multiarch: Pull tarballs #337
Closed
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ea02a45
Add -a flag for multiarch support in alpine-builder.
alexkreidler 849e396
Add ARCHS variable for building different architectures.
alexkreidler bff6d50
Add an example of multi-arch
alexkreidler 1e628d9
Update docs for multi-arch
alexkreidler 30c3026
Fix typo in library-edge options
alexkreidler 1ff565c
Update library spec generator for multi-arch
alexkreidler 8d0364a
Fix tagging of images for multi-arch
alexkreidler 8bc9dc9
Fix style shellcheck issues, add comments
alexkreidler 51e4e16
Fix rootfs commit glob issue by adding globstar option.
alexkreidler 6498f39
Update .gitignore for new multi-arch structure.
alexkreidler c2585bf
Rewrite commit loop based on options files, fix commit issues.
alexkreidler 2ac88ef
Fix library spec issues
alexkreidler 92e868f
Fix multi-arch builds using binfmt_misc and cross-docker
alexkreidler fa25e94
More binfmt_misc, CI test
alexkreidler bc8f92b
Revert "More binfmt_misc, CI test"
alexkreidler baf05c5
Revert "Fix multi-arch builds using binfmt_misc and cross-docker"
alexkreidler e87c348
Merge remote-tracking branch 'gliderlabs/master'
alexkreidler 31d2112
Merge branch 'master' into multi-arch
alexkreidler 6fe6421
[ci skip] begin to split the build script
alexkreidler 538e0f2
WIP, more pulling tarballs [ci skip]
alexkreidler 3a439c0
Update .gitignore
alexkreidler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,18 +99,57 @@ push() { | |
} | ||
|
||
library() { | ||
|
||
convert() { | ||
# takes a space-separated list of alpine-linux architectures, and returns a space-separated list of docker architectures | ||
local i=0 | ||
for arch in $@; do | ||
case "$arch" in # converts Alpine Linux arch strings to Docker arch strings | ||
x86_64) echo -n "amd64";; | ||
x86) echo -n "i386";; | ||
armhf) echo -n "arm32v7";; # TODO: What about arm32v7 | ||
aarch64) echo -n "arm64v8";; | ||
ppc64le) echo -n "ppc64le";; | ||
s390x) echo -n "s390x";; | ||
*) return 1;; # Fail on unknown archs | ||
esac | ||
if [[ i -ne $#-1 ]]; then | ||
echo -n " " | ||
fi | ||
let i=$i+1 | ||
done | ||
} | ||
|
||
echo | ||
echo "# maintainer: Glider Labs <[email protected]> (@gliderlabs)" | ||
echo "# autogenerated by https://github.com/gliderlabs/docker-alpine/blob/master/build" | ||
echo | ||
echo "GitRepo: https://github.com/gliderlabs/docker-alpine.git" | ||
|
||
for file in versions/library-*/options; do | ||
# shellcheck source=versions/library-3.2/options | ||
source "$file" | ||
local refs | ||
refs="$(git ls-remote --exit-code --heads origin rootfs/library-${RELEASE#v})" | ||
: "${refs:?}" | ||
for tag in "${TAGS[@]}"; do | ||
echo "${tag#*:}:" \ | ||
"git://github.com/gliderlabs/docker-alpine@${refs:0:40}" \ | ||
"versions/library-${RELEASE#v}" | ||
tags=${TAGS[@]} | ||
[[ "$ARCHS" ]] || { # compatability with older configs that were only written for x86_64 architectures | ||
ARCHS=("x86_64") | ||
} | ||
a=$(convert ${ARCHS[@]}) | ||
|
||
printf "\nTags:" && echo ${tags// /, } | ||
echo "Architectures:" ${a// /, } | ||
echo "GitCommit:" ${refs:0:40} | ||
|
||
local i=0 | ||
for arch in $a; do | ||
printf "%s-Directory: " "$arch" | ||
echo "versions/library-${RELEASE#v}/${ARCHS[i]}" | ||
let i=i+1 | ||
done | ||
done | ||
echo | ||
} | ||
|
||
main() { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 there a missing
$
fori
?