mirror of
				https://github.com/zokradonh/kopano-docker
				synced 2025-10-31 02:17:47 +00:00 
			
		
		
		
	Add hints about Docker caching (#255)
* tweaking for docker caching * tweaks to contributing
This commit is contained in:
		
							parent
							
								
									bf114ecd51
								
							
						
					
					
						commit
						b840e66418
					
				| @ -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 | 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: | To speed up testing rebuilds you can override the git hash that is passed as a build argument. | ||||||
| - `make vcs_ref=invalid build-web` | 
 | ||||||
|  | Example: `make vcs_ref=invalid build-web` or `make vcs_ref=invalid build-all` | ||||||
|  | |||||||
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							| @ -12,7 +12,7 @@ core_download_version := $(shell ./version.sh core) | |||||||
| meet_download_version := $(shell ./version.sh meet) | meet_download_version := $(shell ./version.sh meet) | ||||||
| webapp_download_version := $(shell ./version.sh webapp) | webapp_download_version := $(shell ./version.sh webapp) | ||||||
| zpush_download_version := $(shell ./version.sh zpush) | 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_CORE_REPOSITORY_URL := file:/kopano/repo/core | ||||||
| KOPANO_MEET_REPOSITORY_URL := file:/kopano/repo/meet | KOPANO_MEET_REPOSITORY_URL := file:/kopano/repo/meet | ||||||
| @ -53,7 +53,7 @@ ifdef TRAVIS | |||||||
| 	docker pull  $(docker_repo)/kopano_$(component):builder || true | 	docker pull  $(docker_repo)/kopano_$(component):builder || true | ||||||
| endif | endif | ||||||
| 	docker build \
 | 	docker build \
 | ||||||
| 		--build-arg VCS_REF=$(vcf_ref) \
 | 		--build-arg VCS_REF=$(vcs_ref) \
 | ||||||
| 		--build-arg docker_repo=${docker_repo} \
 | 		--build-arg docker_repo=${docker_repo} \
 | ||||||
| 		--build-arg KOPANO_CORE_VERSION=${core_download_version} \
 | 		--build-arg KOPANO_CORE_VERSION=${core_download_version} \
 | ||||||
| 		--build-arg KOPANO_$(COMPONENT)_VERSION=${$(component)_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_PACKAGES=$(ADDITIONAL_KOPANO_PACKAGES) \
 | ||||||
| 		--build-arg ADDITIONAL_KOPANO_WEBAPP_PLUGINS=$(ADDITIONAL_KOPANO_WEBAPP_PLUGINS) \
 | 		--build-arg ADDITIONAL_KOPANO_WEBAPP_PLUGINS=$(ADDITIONAL_KOPANO_WEBAPP_PLUGINS) \
 | ||||||
| 		--cache-from $(docker_repo)/kopano_$(component):builder \
 | 		--cache-from $(docker_repo)/kopano_$(component):builder \
 | ||||||
|  | 		--cache-from $(docker_repo)/kopano_$(component):latest \
 | ||||||
| 		-t $(docker_repo)/kopano_$(component) $(component)/ | 		-t $(docker_repo)/kopano_$(component) $(component)/ | ||||||
| 
 | 
 | ||||||
| .PHONY: build-simple | .PHONY: build-simple | ||||||
| build-simple: component ?= ssl | build-simple: component ?= ssl | ||||||
| build-simple: ## Helper target to build a simplified image (no Kopano repo integration).
 | build-simple: ## Helper target to build a simplified image (no Kopano repo integration).
 | ||||||
| 	docker build \
 | 	docker build \
 | ||||||
| 		--build-arg VCS_REF=$(vcf_ref) \
 | 		--build-arg VCS_REF=$(vcs_ref) \
 | ||||||
| 		--build-arg docker_repo=$(docker_repo) \
 | 		--build-arg docker_repo=$(docker_repo) \
 | ||||||
|  | 		--cache-from $(docker_repo)/kopano_$(component):latest \
 | ||||||
| 		-t $(docker_repo)/kopano_$(component) $(component)/ | 		-t $(docker_repo)/kopano_$(component) $(component)/ | ||||||
| 
 | 
 | ||||||
| .PHONY: build-builder | .PHONY: build-builder | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user