mirror of
https://github.com/unpoller/unpoller.git
synced 2026-04-05 08:54:09 -04:00
Add Docker labels.
This commit is contained in:
@@ -7,6 +7,10 @@ set -e -o pipefail
|
||||
# The Docker Cloud config must pass in the BUILDS env variable.
|
||||
# See README.md (in this dir) and the screenshot for more info.
|
||||
|
||||
VERSION=$(git tag -l --merged | tail -n1 | tr -d v) # 1.2.3
|
||||
DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
COMMIT=$(git rev-parse --short HEAD)
|
||||
|
||||
# Build each configured image from Docker Cloud.
|
||||
for build in $BUILDS; do
|
||||
# os:name:arch:variant
|
||||
@@ -15,6 +19,9 @@ for build in $BUILDS; do
|
||||
echo "Building Image ${IMAGE_NAME}_${os}_${name}"
|
||||
docker build \
|
||||
--build-arg "ARCH=${name}" \
|
||||
--build-arg "BUILD_DATE=${DATE}" \
|
||||
--build-arg "COMMIT=${COMMIT}" \
|
||||
--build-arg "VERSION=${VERSION}" \
|
||||
--tag "${IMAGE_NAME}_${os}_${name}" \
|
||||
--file Dockerfile ../..
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user