1 FROM @aai.docker.namespace@/aai-common-@aai.base.image@:@aai.base.image.version@
3 ARG MICRO_HOME=/opt/app/model-loader
5 # Additional optional steps for Ubuntu
6 RUN if ((uname -v | grep -i "ubuntu") || ( cat /etc/*release|grep -i "ubuntu") ) ; then \
7 #####################################
8 #if JAVA doesnt exist then install it:
9 ######################################
10 if type java 2>/dev/null; then \
11 echo "skipping java installation"; \
13 apt-get update && apt-get install -y software-properties-common; \
14 ## sudo -E is required to preserve the environment. If you remove that line, it will most like freeze at this step
15 sudo -E add-apt-repository ppa:openjdk-r/ppa && apt-get update && apt-get install -y openjdk-8-jdk ; \
16 ## Setup JAVA_HOME, this is useful for docker commandline
17 JAVA_HOME=usr/lib/jvm/java-8-openjdk-amd64; \
20 ##########################################
21 #Install gosu if not present
22 ##########################################
23 if type gosu 2>/dev/null; then \
24 echo "skipping gosu installation"; \
27 add-apt-repository -y ppa:tianon/gosu; \
28 sudo apt-get update; \
29 sudo apt-get install gosu; \
32 # Build up the deployment folder structure
33 RUN mkdir -p $MICRO_HOME
35 COPY /maven/model-loader/ .
37 && ln -s /logs $MICRO_HOME/logs
39 CMD ["/opt/app/model-loader/bin/start.sh"]