2020-01-30 16:05:56 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# https://docs.docker.com/docker-cloud/builds/advanced/
|
|
|
|
|
|
|
|
# $IMAGE_NAME var is injected into the build so the tag is correct.
|
|
|
|
echo "[***] Build hook running"
|
|
|
|
|
|
|
|
export $(grep -v '^#' ../.env | xargs)
|
|
|
|
|
2020-02-21 16:05:42 +01:00
|
|
|
docker pull $DOCKER_REPO:core-latest
|
|
|
|
|
2020-01-30 16:05:56 +01:00
|
|
|
docker build \
|
2020-01-30 16:45:07 +01:00
|
|
|
--build-arg MISP_TAG=$MISP_TAG \
|
|
|
|
--build-arg PHP_VER=$PHP_VER \
|
2020-01-30 16:05:56 +01:00
|
|
|
--build-arg BUILD_RFC3339=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
|
|
|
|
--build-arg COMMIT=$(git rev-parse --short HEAD) \
|
|
|
|
--build-arg VERSION=$(git describe --tags --always) \
|
|
|
|
-t $IMAGE_NAME .
|