mirror of
https://github.com/unpoller/unpoller.git
synced 2026-04-05 08:54:00 -04:00
fix homebrew and arm docker builds
This commit is contained in:
@@ -12,10 +12,10 @@ follow the example provided here. All of the hooks are generic, and will work wi
|
||||
any build. Two environment variables must be passed in from Docker Cloud config.
|
||||
|
||||
1. `BUILDS` must be set to the builds you're trying to perform. This repo is currently set to:
|
||||
- `linux:armhf:arm: linux:arm64:arm64:armv8 linux:amd64:amd64: linux:i386:386:`
|
||||
- The format is `os:name:arch:variant`.
|
||||
- `linux:armhf:arm linux:arm64:arm64 linux:amd64:amd64 linux:i386:386`
|
||||
- The format is `os:name:arch`.
|
||||
- `os` and `name` are passed into the Dockerfile.
|
||||
- `os`, `arch` and `variant` are passed into `docker manifest annotate`.
|
||||
- `os`, `arch` are passed into `docker manifest annotate`.
|
||||
- This does not yet work with an OS other than `linux`.
|
||||
1. Set `DOCKER_CLI_EXPERIMENTAL` to `enabled`. Not optional.
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ source .metadata.sh
|
||||
|
||||
# Build each configured image from Docker Cloud.
|
||||
for build in $BUILDS; do
|
||||
# os:name:arch:variant
|
||||
# os:name:arch
|
||||
os=$(echo $build | cut -d: -f1)
|
||||
name=$(echo $build | cut -d: -f2)
|
||||
echo "Building Image ${IMAGE_NAME}_${os}_${name}"
|
||||
|
||||
@@ -10,10 +10,12 @@ pushd ../..
|
||||
source .metadata.sh
|
||||
popd
|
||||
|
||||
if [ "$BUILDS" != "" ]; then
|
||||
if [ "$TAGS" == "" ]; then
|
||||
TAGS=$DOCKER_TAG
|
||||
fi
|
||||
|
||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
|
||||
# Push the extra custom images that were created.
|
||||
for build in $BUILDS; do
|
||||
os=$(echo $build | cut -d: -f1)
|
||||
@@ -45,9 +47,8 @@ for tag in $TAGS; do
|
||||
os=$(echo $build | cut -d: -f1)
|
||||
name=$(echo $build | cut -d: -f2)
|
||||
arch=$(echo $build | cut -d: -f3)
|
||||
vari=$(echo $build | cut -d: -f4)
|
||||
# Annotating updates the manifest to describe each images' capabilities.
|
||||
docker manifest annotate ${DOCKER_REPO}:${tag} ${IMAGE_NAME}_${os}_${name} --os ${os} --arch ${arch} --variant "${vari}"
|
||||
docker manifest annotate ${DOCKER_REPO}:${tag} ${IMAGE_NAME}_${os}_${name} --os ${os} --arch ${arch}
|
||||
done
|
||||
echo "Pushing Manifest ${DOCKER_REPO}:${tag}"
|
||||
docker manifest push ${DOCKER_REPO}:${tag}
|
||||
|
||||
Reference in New Issue
Block a user