1
0
mirror of https://github.com/docker-mailserver/docker-mailserver.git synced 2025-08-09 23:07:35 +02:00

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>
This commit is contained in:
Felix Bartels
2019-10-23 11:22:23 +02:00
committed by GitHub
parent 1029777ffa
commit 7ff9764285
5 changed files with 30 additions and 11 deletions

View File

@@ -1,15 +1,15 @@
NAME = tvial/docker-mailserver:testing
VCS_REF := $(shell git rev-parse --short HEAD)
VCS_VERSION := $(shell git describe)
all: build-no-cache backup generate-accounts run generate-accounts-after-run fixtures tests clean
all-fast: build backup generate-accounts run generate-accounts-after-run fixtures tests clean
all: build backup generate-accounts run generate-accounts-after-run fixtures tests clean
no-build: backup generate-accounts run generate-accounts-after-run fixtures tests clean
build-no-cache:
export DOCKER_MAIL_DOCKER_BUILD_NO_CACHE=--no-cache
docker build --no-cache -t $(NAME) .
build:
docker build -t $(NAME) .
docker build \
--build-arg VCS_REF=$(VCS_REF) \
--build-arg VCS_VERSION=$(VCS_VERSION) \
-t $(NAME) .
backup:
# if backup directories exist, clean hasn't been called, therefore we shouldn't overwrite it. It still contains the original content.