1
0
mirror of https://github.com/Tecnativa/docker-socket-proxy synced 2024-12-22 06:38:07 +00:00
docker-socket-proxy/hooks/build

41 lines
678 B
Plaintext
Raw Normal View History

2017-03-29 09:32:48 +00:00
#!/bin/bash
set -ex
2019-07-19 23:32:49 +00:00
# Extract arch repo from a docker tag suffix
REPO=""
case "$DOCKER_TAG" in
*amd64)
REPO="library"
;;
*arm32v5)
REPO="arm32v5"
;;
*arm32v6)
REPO="arm32v6"
;;
*arm32v7)
REPO="arm32v7"
;;
*arm64v8)
REPO="arm64v8"
;;
*i386)
REPO="i386"
;;
*ppc64le)
REPO="ppc64le"
;;
*s390x)
REPO="s390x"
;;
*)
REPO="library"
;;
esac
2017-03-29 09:32:48 +00:00
docker build \
2019-07-19 23:32:49 +00:00
--build-arg REPO="$REPO" \
2017-03-29 09:32:48 +00:00
--build-arg VCS_REF="$GIT_SHA1" \
--build-arg BUILD_DATE="$(date --rfc-3339 ns)" \
--tag "$IMAGE_NAME" .