summaryrefslogtreecommitdiffstats
path: root/aai-common-docker/aai-common-images/src/main
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2019-08-15 17:10:36 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-15 17:10:36 +0000
commit55228282b74da3ee98619fbb4604d0f21a75cf4c (patch)
treeabb60eff8c42e4796c7a026e675fdde822c509f9 /aai-common-docker/aai-common-images/src/main
parentb6169d1ab53f9264a181fef03be77fcd2bf02976 (diff)
parent649585b88b758d5c3e702446385ffe733ceea824 (diff)
Merge "Created maven modules for aai-common docker images."
Diffstat (limited to 'aai-common-docker/aai-common-images/src/main')
-rw-r--r--aai-common-docker/aai-common-images/src/main/docker/Dockerfile.alpine39
-rw-r--r--aai-common-docker/aai-common-images/src/main/docker/Dockerfile.ubuntu35
2 files changed, 74 insertions, 0 deletions
diff --git a/aai-common-docker/aai-common-images/src/main/docker/Dockerfile.alpine b/aai-common-docker/aai-common-images/src/main/docker/Dockerfile.alpine
new file mode 100644
index 00000000..915c511e
--- /dev/null
+++ b/aai-common-docker/aai-common-images/src/main/docker/Dockerfile.alpine
@@ -0,0 +1,39 @@
+FROM openjdk:8-jre-alpine3.9
+
+# Set the version of the gosu command and if needs to be, it can be modified at runtime
+ENV GOSU_VERSION 1.10
+
+# For building the image in a proxy environment if necessary
+ARG HTTP_PROXY
+ARG HTTPS_PROXY
+ARG no_proxy
+
+ENV HTTP_PROXY ${HTTP_PROXY}
+ENV HTTPS_PROXY ${HTTPS_PROXY}
+ENV http_proxy ${HTTP_PROXY}
+ENV https_proxy ${HTTPS_PROXY}
+ENV no_proxy 127.0.0.1,localhost,${no_proxy}
+
+RUN \
+ # Put all the dependencies into this variable to easily install everything
+ DEPS="ca-certificates \
+ curl \
+ dpkg \
+ fastjar \
+ jq \
+ loksh \
+ bash \
+ netcat-openbsd \
+ openssl \
+ shadow \
+ util-linux \
+ wget" \
+ && apk add --no-cache ${DEPS} \
+ # need fastjar for some projects to update app's jar on container restart
+ && ln -snf /usr/bin/fastjar $JAVA_HOME/bin/jar \
+ # Get the dpkg to properly download and install that version compatible to install GOSU on the image
+ && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
+ # Downloads the gosu command based on the dpkg version and gosu version supplied
+ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
+ # Use GPG to install the gosu application locally
+ && chmod +x /usr/local/bin/gosu
diff --git a/aai-common-docker/aai-common-images/src/main/docker/Dockerfile.ubuntu b/aai-common-docker/aai-common-images/src/main/docker/Dockerfile.ubuntu
new file mode 100644
index 00000000..d81579d4
--- /dev/null
+++ b/aai-common-docker/aai-common-images/src/main/docker/Dockerfile.ubuntu
@@ -0,0 +1,35 @@
+FROM ubuntu:16.04
+
+# Set the version of the gosu command and if needs to be, it can be modified at runtime
+ENV GOSU_VERSION 1.10
+
+# For building the image in a proxy environment if necessary
+ARG HTTP_PROXY
+ARG HTTPS_PROXY
+ARG no_proxy
+
+ENV HTTP_PROXY ${HTTP_PROXY}
+ENV HTTPS_PROXY ${HTTPS_PROXY}
+ENV http_proxy ${HTTP_PROXY}
+ENV https_proxy ${HTTPS_PROXY}
+ENV no_proxy 127.0.0.1,localhost,${no_proxy}
+
+RUN \
+ # Creates the group and user with the name aaiadmin for aai
+ #groupadd -r aaiadmin && useradd -r -g aaiadmin aaiadmin && \
+ # Put all the dependencies into this variable to easily install everything
+ DEPS="ca-certificates curl git fastjar jq ksh libcurl3 netcat openjdk-8-jre-headless vim uuid-runtime wget" && \
+ # Run the update before for the package manager to properly fetch install packages
+ apt-get update && \
+ # Install the recommended dependencies
+ apt-get install -y --no-install-recommends $DEPS && \
+ # Remove all the cache for the apt package manager
+ rm -rf /var/lib/apt/lists/* && \
+ # Get the dpkg to properly download and install that version compatible to install GOSU on the image
+ dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" && \
+ \
+ # Downloads the gosu command based on the dpkg version and gosu version supplied
+ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
+ \
+ # Use GPG to install the gosu application locally
+ chmod +x /usr/local/bin/gosu