-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore | ||
.idea/ | ||
*.iml |
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,18 @@ | ||
#!/bin/bash | ||
|
||
# Autobuild the Image on Docker Hub with advanced options and buildx for multiarch images | ||
# read more: https://github.com/Tob1asDocker/dockerhubhooksexample | ||
|
||
# '--push' shorthand for '--output=type=registry' | ||
|
||
set -ex | ||
|
||
echo "### RUN build START: using buildx ###" | ||
echo "Image Name: ${IMAGE_NAME} (Repo: ${DOCKER_REPO}, Tag: ${DOCKER_TAG})" | ||
echo "Dockerfile Path/Name: ${DOCKERFILE_PATH}" | ||
BUILDPLATFORM="${BUILDPLATFORM:-"linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6"}" | ||
echo "Architectures=${BUILDPLATFORM}" | ||
|
||
docker buildx build --build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" --build-arg VCS_REF="$(git rev-parse --short HEAD)" --tag "${IMAGE_NAME}" --platform "${BUILDPLATFORM}" --file "${DOCKERFILE_PATH}" --push . | ||
|
||
echo "### RUN build END" |
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,26 @@ | ||
#!/bin/bash | ||
|
||
# Autobuild the Image on Docker Hub with advanced options and buildx for multiarch images | ||
# read more: https://github.com/Tob1asDocker/dockerhubhooksexample | ||
|
||
set -ex | ||
|
||
echo "### RUN pre_build START: QEMU and buildx ###" | ||
|
||
# docker settings | ||
#export DOCKER_CLI_EXPERIMENTAL=enabled | ||
#export DOCKER_BUILDKIT=1 | ||
|
||
# need binfmt-support and qemu-user-static | ||
#apt-get update && apt-get install -y qemu-user-static binfmt-support | ||
#docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | ||
docker run --rm --privileged multiarch/qemu-user-static:register --reset | ||
|
||
# docker buildx settings | ||
#docker buildx create --name multiarchbuilder | ||
#docker buildx use multiarchbuilder | ||
docker buildx create --use --name multiarchbuilder | ||
#docker buildx inspect --bootstrap | ||
docker buildx ls | ||
|
||
echo "### RUN pre_build END ###" |
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,7 @@ | ||
#!/bin/bash | ||
|
||
# If use 'docker buildx build' then disable the push of 'docker build', because the push has already been done and fails here. | ||
|
||
set -ex | ||
|
||
echo "### RUN push: This has already been done by buildx. ###" |