1
0
mirror of https://github.com/zokradonh/kopano-docker synced 2025-06-07 07:56:12 +00:00

Add hints about Docker caching (#255)

* tweaking for docker caching
* tweaks to contributing
This commit is contained in:
Felix Bartels 2019-10-09 19:46:54 +02:00 committed by GitHub
parent bf114ecd51
commit b840e66418
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -5,5 +5,6 @@ email, or any other method with the owners of this repository before making a ch
Please see https://github.com/zokradonh/kopano-docker/blob/master/README.md#when-building-my-own-containers-how-can-i-make-sure-my-build-works-as-expected for testing remakrs
Speeding up testing rebuilds:
- `make vcs_ref=invalid build-web`
To speed up testing rebuilds you can override the git hash that is passed as a build argument.
Example: `make vcs_ref=invalid build-web` or `make vcs_ref=invalid build-all`

View File

@ -12,7 +12,7 @@ core_download_version := $(shell ./version.sh core)
meet_download_version := $(shell ./version.sh meet)
webapp_download_version := $(shell ./version.sh webapp)
zpush_download_version := $(shell ./version.sh zpush)
vcf_ref := $(shell git rev-parse --short HEAD)
vcs_ref := $(shell git rev-parse --short HEAD)
KOPANO_CORE_REPOSITORY_URL := file:/kopano/repo/core
KOPANO_MEET_REPOSITORY_URL := file:/kopano/repo/meet
@ -53,7 +53,7 @@ ifdef TRAVIS
docker pull $(docker_repo)/kopano_$(component):builder || true
endif
docker build \
--build-arg VCS_REF=$(vcf_ref) \
--build-arg VCS_REF=$(vcs_ref) \
--build-arg docker_repo=${docker_repo} \
--build-arg KOPANO_CORE_VERSION=${core_download_version} \
--build-arg KOPANO_$(COMPONENT)_VERSION=${$(component)_download_version} \
@ -69,14 +69,16 @@ endif
--build-arg ADDITIONAL_KOPANO_PACKAGES=$(ADDITIONAL_KOPANO_PACKAGES) \
--build-arg ADDITIONAL_KOPANO_WEBAPP_PLUGINS=$(ADDITIONAL_KOPANO_WEBAPP_PLUGINS) \
--cache-from $(docker_repo)/kopano_$(component):builder \
--cache-from $(docker_repo)/kopano_$(component):latest \
-t $(docker_repo)/kopano_$(component) $(component)/
.PHONY: build-simple
build-simple: component ?= ssl
build-simple: ## Helper target to build a simplified image (no Kopano repo integration).
docker build \
--build-arg VCS_REF=$(vcf_ref) \
--build-arg VCS_REF=$(vcs_ref) \
--build-arg docker_repo=$(docker_repo) \
--cache-from $(docker_repo)/kopano_$(component):latest \
-t $(docker_repo)/kopano_$(component) $(component)/
.PHONY: build-builder