summaryrefslogtreecommitdiffstats
path: root/Dockerfiles/aai-common
diff options
context:
space:
mode:
authorKajur, Harish (vk250x) <vk250x@att.com>2019-04-11 12:13:59 -0400
committerHarish Venkata Kajur <vk250x@att.com>2019-04-11 12:23:20 -0400
commit161624c39c54d6cac539ed11a641e9d2b8c6248c (patch)
treede8c8837637a9151e01d7e90600299da91e07261 /Dockerfiles/aai-common
parentb246959cee2989220eff5d3e92028c685a201b67 (diff)
Add haproxy Dockerfile related files
Issue-ID: AAI-2235 Change-Id: If4d4439aa0e61e0f00ae4e2b6f1dcfdf50a79dff Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
Diffstat (limited to 'Dockerfiles/aai-common')
-rw-r--r--Dockerfiles/aai-common/Dockerfile35
-rw-r--r--Dockerfiles/aai-common/README.md13
2 files changed, 48 insertions, 0 deletions
diff --git a/Dockerfiles/aai-common/Dockerfile b/Dockerfiles/aai-common/Dockerfile
new file mode 100644
index 00000000..fb7b6671
--- /dev/null
+++ b/Dockerfiles/aai-common/Dockerfile
@@ -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="wget ca-certificates curl ksh git openjdk-8-jre-headless jq vim netcat uuid-runtime" && \
+ # 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
diff --git a/Dockerfiles/aai-common/README.md b/Dockerfiles/aai-common/README.md
new file mode 100644
index 00000000..e61c63fb
--- /dev/null
+++ b/Dockerfiles/aai-common/README.md
@@ -0,0 +1,13 @@
+# AAI Common Docker README
+
+### Building the image
+
+Run the following command if building the image in internal network
+
+```bash
+ export NEW_VERSION=<NEW_VERSION>
+ docker build \
+ -t aaionap/aai-common:${NEW_VERSION} .
+```
+
+Replace the NEW\_VERSION with the new docker image version for aai-common