mirror of
				https://github.com/zokradonh/kopano-docker
				synced 2025-10-31 02:17:47 +00:00 
			
		
		
		
	Configurable uid gid (#9)
* allow to specify uid and gid for kopano * Set default value of GID/UID to keep compatibility with existing containers
This commit is contained in:
		
							parent
							
								
									7bbdfecb0e
								
							
						
					
					
						commit
						d0735ebd08
					
				
							
								
								
									
										4
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								Makefile
									
									
									
									
									
								
							| @ -24,6 +24,8 @@ KOPANO_WEBAPP_SMIME_REPOSITORY_URL := file:/kopano/repo/smime | ||||
| KOPANO_ZPUSH_REPOSITORY_URL := http://repo.z-hub.io/z-push:/final/Debian_9.0/ | ||||
| RELEASE_KEY_DOWNLOAD := 0 | ||||
| DOWNLOAD_COMMUNITY_PACKAGES := 1 | ||||
| KOPANO_UID := 999 | ||||
| KOPANO_GID := 999 | ||||
| 
 | ||||
| DOCKERCOMPOSE_FILE := docker-compose.yml -f docker-compose.db.yml -f docker-compose.ldap.yml -f docker-compose.mail.yml | ||||
| TAG_FILE := build.tags | ||||
| @ -70,6 +72,8 @@ endif | ||||
| 		--build-arg DOWNLOAD_COMMUNITY_PACKAGES=$(DOWNLOAD_COMMUNITY_PACKAGES) \
 | ||||
| 		--build-arg ADDITIONAL_KOPANO_PACKAGES=$(ADDITIONAL_KOPANO_PACKAGES) \
 | ||||
| 		--build-arg ADDITIONAL_KOPANO_WEBAPP_PLUGINS=$(ADDITIONAL_KOPANO_WEBAPP_PLUGINS) \
 | ||||
| 		--build-arg KOPANO_UID=$(KOPANO_UID) \
 | ||||
| 		--build-arg KOPANO_GID=$(KOPANO_GID) \
 | ||||
| 		--cache-from $(docker_repo)/kopano_$(component):builder \
 | ||||
| 		--cache-from $(docker_repo)/kopano_$(component):latest \
 | ||||
| 		-t $(docker_repo)/kopano_$(component) $(component)/ | ||||
|  | ||||
| @ -8,6 +8,9 @@ ARG KOPANO_CORE_VERSION=newest | ||||
| ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" | ||||
| ARG RELEASE_KEY_DOWNLOAD=0 | ||||
| 
 | ||||
| ARG KOPANO_UID=999 | ||||
| ARG KOPANO_GID=999 | ||||
| 
 | ||||
| ENV \ | ||||
|     BASE_VERSION=1.3.0 \ | ||||
|     DEBUG="" \ | ||||
| @ -47,6 +50,10 @@ RUN apt-get update && \ | ||||
|         curl -s -S -o - "${KOPANO_CORE_REPOSITORY_URL}/Release.key" | apt-key add -; \ | ||||
|     fi | ||||
| 
 | ||||
| # Create kopano user and group | ||||
| RUN groupadd --system --gid ${KOPANO_GID} kopano | ||||
| RUN useradd --system --shell /usr/sbin/nologin --home /var/lib/kopano --gid ${KOPANO_GID} --uid ${KOPANO_UID} kopano | ||||
| 
 | ||||
| ENV DOCKERIZE_VERSION v0.11.0 | ||||
| RUN curl -sfL https://github.com/powerman/dockerize/releases/download/"$DOCKERIZE_VERSION"/dockerize-"$(uname -s)"-"$(uname -m)" \ | ||||
|     | install /dev/stdin /usr/local/bin/dockerize && \ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user