1 FROM @aai.docker.namespace@/aai-common-@aai.base.image@:@aai.base.image.version@
3 ARG MICRO_HOME=/opt/app/search-data-service
4 ARG BIN_HOME=$MICRO_HOME/bin
5 #AAI-2179 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; \
33 # Build up the deployment folder structure
34 RUN mkdir -p $MICRO_HOME $USERS_HOME /logs
36 RUN mkdir -p $MICRO_HOME/bundleconfig/etc
37 RUN mkdir -p $BIN_HOME
38 # copy everything from search-data-service-app/target/docker/nexus3.onap.org/10003/onap/search-data-service/latest/build/maven/search-data-service-app
39 COPY /maven/search-data-service-app/ .
40 RUN chmod -R 755 $BIN_HOME/* $MICRO_HOME/*
41 RUN ln -snf /logs $MICRO_HOME/logs
45 CMD ["/opt/app/search-data-service/bin/start.sh"]