mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-31 10:49:00 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM openjdk:8 as builder
 | |
| 
 | |
| ARG ENABLE_REACT
 | |
| ARG PORT
 | |
| 
 | |
| RUN apt-get update && apt-get install -y wget \
 | |
|     && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
 | |
|     && apt-get -y install ./google-chrome-stable_current_amd64.deb
 | |
| 
 | |
| ENV CI=true
 | |
| 
 | |
| COPY . datahub-src
 | |
| RUN cd datahub-src && ./gradlew :datahub-frontend:dist -PenableReact=${ENABLE_REACT} \
 | |
|     && cp datahub-frontend/build/distributions/datahub-frontend.zip ../datahub-frontend.zip \
 | |
|     && cd .. && rm -rf datahub-src && unzip datahub-frontend.zip
 | |
| 
 | |
| FROM openjdk:8-jre-alpine
 | |
| 
 | |
| RUN addgroup -S datahub && adduser -S datahub -G datahub
 | |
| 
 | |
| COPY --from=builder /datahub-frontend /datahub-frontend/
 | |
| RUN chown -R datahub:datahub /datahub-frontend && chmod 755 /datahub-frontend
 | |
| USER datahub
 | |
| EXPOSE ${PORT:-9001}
 | |
| 
 | |
| ENV JAVA_OPTS=" \
 | |
| 	-Xms512m \
 | |
| 	-Xmx1024m \
 | |
| 	-Dhttp.port=${PORT:-9001} \
 | |
| 	-Dconfig.file=datahub-frontend/conf/application.conf \
 | |
| 	-Djava.security.auth.login.config=datahub-frontend/conf/jaas.conf \
 | |
| 	-Dlogback.configurationFile=datahub-frontend/conf/logback.xml \
 | |
| 	-Dlogback.debug=true \
 | |
| 	-Dpidfile.path=/datahub-frontend/play.pid"
 | |
| CMD ["datahub-frontend/bin/playBinary"] | 
