1
0
mirror of https://github.com/tomav/docker-mailserver.git synced 2024-07-02 14:11:12 +02:00
docker-mailserver/hooks/build
Felix Bartels 7ff9764285
Provide version information through labels (#1256)
* Provide version information through labels

Can be retrieved by calling e.g. `docker inspect -f {{.Config.Labels}} tvial/docker-mailserver:testing`

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* add build hook so that Docker Hub can work with the build args

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* remove obsolete build-no-cache

build args invalidate build cache already

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* adapt travis file

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* shellcheck

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-10-23 11:22:23 +02:00

9 lines
210 B
Bash
Executable File

#!/bin/sh
VCS_REF=$(git rev-parse --short HEAD)
VCS_VERSION=$(git describe)
docker build \
--build-arg VCS_REF="$VCS_REF" \
--build-arg VCS_VERSION="$VCS_VERSION" \
-f "$DOCKERFILE_PATH" -t "$IMAGE_NAME" .