mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	When building rootless docker image move chown&chmod to build stage (#13578)
* When building rootless docker image move chown&chmod to build stage Fixes #13577 * Fix command newlines * Move chown to COPY command * Seems to be working also without chmod Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		@@ -50,8 +50,7 @@ RUN mkdir -p /var/lib/gitea /etc/gitea
 | 
				
			|||||||
RUN chown git:git /var/lib/gitea /etc/gitea
 | 
					RUN chown git:git /var/lib/gitea /etc/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY docker/rootless /
 | 
					COPY docker/rootless /
 | 
				
			||||||
COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /usr/local/bin/gitea
 | 
					COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/gitea /usr/local/bin/gitea
 | 
				
			||||||
RUN chown root:root /usr/local/bin/* && chmod 755 /usr/local/bin/*
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
USER git:git
 | 
					USER git:git
 | 
				
			||||||
ENV GITEA_WORK_DIR /var/lib/gitea
 | 
					ENV GITEA_WORK_DIR /var/lib/gitea
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user