mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	tools/ci: Create a github user instead of a circleci user.
While we are making this change, we create a ARG USERNAME variable that behaves like ENV but just for the lifetime of the Dockerfile.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							a2c2c6ceff
						
					
				
				
					commit
					92f98292c1
				
			@@ -96,11 +96,12 @@ RUN apt-get update \
 | 
			
		||||
    libxml2-dev libxslt1-dev libpq-dev \
 | 
			
		||||
    {extra_packages}
 | 
			
		||||
 | 
			
		||||
RUN groupadd --gid 3434 circleci \
 | 
			
		||||
  && useradd --uid 3434 --gid circleci --shell /bin/bash --create-home circleci \
 | 
			
		||||
  && echo 'circleci ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers.d/50-circleci \
 | 
			
		||||
ARG USERNAME=github
 | 
			
		||||
RUN groupadd --gid 3434 $USERNAME \
 | 
			
		||||
  && useradd --uid 3434 --gid $USERNAME --shell /bin/bash --create-home $USERNAME \
 | 
			
		||||
  && echo "$USERNAME ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers.d/50-$USERNAME \
 | 
			
		||||
  && echo 'Defaults    env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
 | 
			
		||||
 | 
			
		||||
USER circleci
 | 
			
		||||
USER $USERNAME
 | 
			
		||||
 | 
			
		||||
CMD ["/bin/sh"]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user