forked from squidfunk/mkdocs-material
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Yang Deokgyu <secugyu@gmail.com>
- Loading branch information
1 parent
1500a5a
commit cd5f00d
Showing
4 changed files
with
42 additions
and
1 deletion.
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
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 | ||
|
||
docker build \ | ||
--file "${DOCKERFILE_PATH}" \ | ||
--build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \ | ||
--build-arg VCS_REF="$(git rev-parse --short HEAD)" \ | ||
--tag "$IMAGE_NAME" \ | ||
. |
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 @@ | ||
#!/bin/bash | ||
|
||
BUILD_ARCH=$(echo "${DOCKERFILE_PATH}" | cut -d '.' -f 2) | ||
|
||
[ "${BUILD_ARCH}" == "Dockerfile" ] && \ | ||
{ echo 'qemu-user-static: Download not required for current arch'; exit 0; } | ||
|
||
QEMU_USER_STATIC_ARCH=$([ "${BUILD_ARCH}" == "armhf" ] && echo "${BUILD_ARCH::-2}" || echo "${BUILD_ARCH}") | ||
QEMU_USER_STATIC_DOWNLOAD_URL="https://github.com/multiarch/qemu-user-static/releases/download" | ||
QEMU_USER_STATIC_LATEST_TAG=$(curl -s https://api.github.com/repos/multiarch/qemu-user-static/tags \ | ||
| grep 'name.*v[0-9]' \ | ||
| head -n 1 \ | ||
| cut -d '"' -f 4) | ||
|
||
curl -SL "${QEMU_USER_STATIC_DOWNLOAD_URL}/${QEMU_USER_STATIC_LATEST_TAG}/x86_64_qemu-${QEMU_USER_STATIC_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,8 @@ | ||
#!/bin/bash | ||
|
||
BUILD_ARCH=$(echo "${DOCKERFILE_PATH}" | cut -d '.' -f 2) | ||
|
||
[ "${BUILD_ARCH}" == "Dockerfile" ] && \ | ||
{ echo 'qemu-user-static: Registration not required for current arch'; exit 0; } | ||
|
||
docker run --rm --privileged multiarch/qemu-user-static:register --reset |
cd5f00d
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.
References: