Docker: run as parity user (#9689)
This commit is contained in:
		
							parent
							
								
									5b87327a43
								
							
						
					
					
						commit
						1388f4d27e
					
				@ -15,8 +15,17 @@ RUN apt autoremove -y
 | 
			
		||||
RUN apt clean -y
 | 
			
		||||
RUN rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
 | 
			
		||||
 | 
			
		||||
RUN groupadd -g 1000 parity \
 | 
			
		||||
  && useradd -m -u 1000 -g parity -s /bin/sh parity
 | 
			
		||||
 | 
			
		||||
USER parity
 | 
			
		||||
 | 
			
		||||
WORKDIR /home/parity
 | 
			
		||||
 | 
			
		||||
ENV PATH "~/bin:${PATH}"
 | 
			
		||||
 | 
			
		||||
#add TARGET to docker image
 | 
			
		||||
COPY artifacts/x86_64-unknown-linux-gnu/$TARGET /usr/bin/$TARGET
 | 
			
		||||
COPY artifacts/x86_64-unknown-linux-gnu/$TARGET ./bin/$TARGET
 | 
			
		||||
 | 
			
		||||
# Build a shell script because the ENTRYPOINT command doesn't like using ENV
 | 
			
		||||
RUN echo "#!/bin/bash \n ${TARGET} \$@" > ./entrypoint.sh
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user