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