This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multi architecture support for init-controller image (#68)
* support multiple docker arch image * have to use buildx * trying travis * changed default repo for deploy * changed repo * edited out releases on travis branch * commented out tests * change to use TRAVIS TAG * removed tests * removed test script * install qemu * changed script * check contnets of package * list contents * list package * changed makefile * reverted back to allow merge into appsody * removed return at the end of test file * removed duplicate line at start of script * changes from feeedback * fixed declare
- Loading branch information
CameronMcWilliam
authored
Mar 31, 2020
1 parent
3039d55
commit 1621bc3
Showing
6 changed files
with
30 additions
and
10 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,4 +1,5 @@ | ||
/controller | ||
/build | ||
/package | ||
.vscode/ | ||
.vscode/ | ||
.DS_Store |
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
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 @@ | ||
FROM busybox | ||
|
||
COPY ./package/appsody-controller /appsody-controller | ||
ARG TARGETPLATFORM | ||
COPY ./package/appsody-controller-$TARGETPLATFORM /appsody-controller | ||
RUN chmod +x /appsody-controller | ||
WORKDIR / | ||
CMD ["cp","/appsody-controller","/.appsody/appsody-controller"] |
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
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,7 +1,10 @@ | ||
#!/bin/bash | ||
|
||
|
||
set -e | ||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
docker build -t $DOCKER_ORG/init-controller:$TRAVIS_TAG -t $DOCKER_ORG/init-controller:latest . | ||
docker push $DOCKER_ORG/init-controller | ||
# enables experimental daemon for docker buildx: https://docs.docker.com/buildx/working-with-buildx/ | ||
# minimum docker version required for buildx is v19.03 | ||
export DOCKER_CLI_EXPERIMENTAL=enabled | ||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | ||
docker buildx create --name mybuilder | ||
docker buildx use mybuilder | ||
docker buildx build -t $DOCKER_ORG/init-controller:$TRAVIS_TAG -t $DOCKER_ORG/init-controller:latest --platform=linux/amd64,linux/ppc64le,linux/s390x . --push |
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,8 @@ | ||
#!/bin/bash | ||
set -e | ||
for OS_ARCH in linux/amd64 linux/ppc64le linux/s390x | ||
do | ||
declare OS=$(echo $OS_ARCH | cut -f1 -d/) | ||
declare ARCH=$(echo $OS_ARCH | cut -f2 -d/) | ||
GOOS="$OS" CGO_ENABLED=0 GOARCH="$ARCH" go build -o ./build/appsody-controller-"$OS_ARCH" -ldflags "-X main.VERSION=$1" | ||
done |