mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
* Fix: backticks * Fix: date format (change to RFC 3339 format) * Fix: default version * Fix: typo * Fix timeout during launching test fase * Add: --cache-from ***Note: --rfc-3389=s as argument for `date` not used. This is not available within alpine (BusyBox)***
13 lines
340 B
Plaintext
13 lines
340 B
Plaintext
!/bin/bash
|
|
|
|
# Docker Daemon Build Hook
|
|
# $IMAGE_NAME var is injected into the build so the tag is correct.
|
|
|
|
docker build \
|
|
--pull \
|
|
--cache-from=${IMAGE_NAME} \
|
|
--build-arg=BUILD_DATE="$(date +"%Y-%m-%d %H:%M:%S%:z")" \
|
|
--build-arg=VCS_REF=$(git rev-parse --short HEAD) \
|
|
--build-arg=VERSION=$(cat VERSION) \
|
|
-t ${IMAGE_NAME} .
|