forked from dperson/openvpn-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hooks/post_checkout, hooks/post_push, and multi-arch-manifest.yaml tr…
…y to get multi-arch working more smoothly
- Loading branch information
David Personette
committed
Apr 12, 2020
1 parent
5fad6c5
commit 2eca251
Showing
4 changed files
with
33 additions
and
7 deletions.
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 |
---|---|---|
@@ -1,14 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
[[ "${DOCKER_TAG}" == "latest" ]] && \ | ||
API="https://api.github.com/repos/estesp/manifest-tool/tags" | ||
URL="https://github.com/estesp/manifest-tool/releases/download" | ||
TAG=$(curl -Ls $API | awk -F'"' '/name.*v[0-9]/ {print $4; exit}') | ||
curl -LSso manifest-tool "${URL}/${TAG}/manifest-tool-linux-amd64" | ||
chmod +x manifest-tool | ||
|
||
[[ "${DOCKER_TAG}" == "amd64" ]] && \ | ||
{ echo 'qemu-user-static: Download not required for this arch'; exit 0; } | ||
|
||
TAGS_API="https://api.github.com/repos/multiarch/qemu-user-static/tags" | ||
API="https://api.github.com/repos/multiarch/qemu-user-static/tags" | ||
URL="https://github.com/multiarch/qemu-user-static/releases/download" | ||
LATEST_TAG=$(curl -Ls $TAGS_API | \ | ||
awk -F'"' '/name.*v[0-9]/ {print $4; exit}') | ||
TAG=$(curl -Ls $API | awk -F'"' '/name.*v[0-9]/ {print $4; exit}') | ||
ARCH=$([[ "${DOCKER_TAG}" == "armhf" ]] && \ | ||
echo "${DOCKER_TAG::-2}" || echo "${DOCKER_TAG}") | ||
|
||
curl -Ls "${URL}/${LATEST_TAG}/x86_64_qemu-${ARCH}-static.tar.gz" | \ | ||
tar xzv | ||
curl -LSs "${URL}/${TAG}/x86_64_qemu-${ARCH}-static.tar.gz" | tar xzv |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Use manifest-tool to create the manifest, given the experimental | ||
# "docker manifest" command isn't available yet on Docker Hub. | ||
|
||
./manifest-tool push from-spec multi-arch-manifest.yaml |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
[[ "${DOCKER_TAG}" == "latest" ]] && \ | ||
[[ "${DOCKER_TAG}" == "amd64" ]] && \ | ||
{ echo 'qemu-user-static: Registration not required for this arch';exit 0; } | ||
|
||
docker run --rm --privileged multiarch/qemu-user-static:register --reset |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
image: dperson/openvpn-client:latest | ||
manifests: | ||
- image: dperson/openvpn-client:amd64 | ||
platform: | ||
architecture: amd64 | ||
os: linux | ||
- image: dperson/openvpn-client:aarch64 | ||
platform: | ||
architecture: arm64 | ||
os: linux | ||
variant: v8 | ||
- image: dperson/openvpn-client:armhf | ||
platform: | ||
architecture: arm | ||
os: linux | ||
variant: v6 |