aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfiles
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfiles')
-rw-r--r--Dockerfiles/aai-common/Dockerfile.alpine39
-rw-r--r--Dockerfiles/aai-common/Dockerfile.ubuntu (renamed from Dockerfiles/aai-common/Dockerfile)2
-rw-r--r--Dockerfiles/aai-common/README.md19
3 files changed, 55 insertions, 5 deletions
diff --git a/Dockerfiles/aai-common/Dockerfile.alpine b/Dockerfiles/aai-common/Dockerfile.alpine
new file mode 100644
index 00000000..915c511e
--- /dev/null
+++ b/Dockerfiles/aai-common/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/Dockerfiles/aai-common/Dockerfile b/Dockerfiles/aai-common/Dockerfile.ubuntu
index fb7b6671..d81579d4 100644
--- a/Dockerfiles/aai-common/Dockerfile
+++ b/Dockerfiles/aai-common/Dockerfile.ubuntu
@@ -18,7 +18,7 @@ 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" && \
+ 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
diff --git a/Dockerfiles/aai-common/README.md b/Dockerfiles/aai-common/README.md
index e61c63fb..82131247 100644
--- a/Dockerfiles/aai-common/README.md
+++ b/Dockerfiles/aai-common/README.md
@@ -2,12 +2,23 @@
### Building the image
-Run the following command if building the image in internal network
+Run the following command to build AAI common images at internal network
```bash
export NEW_VERSION=<NEW_VERSION>
- docker build \
- -t aaionap/aai-common:${NEW_VERSION} .
+ export BASE_IMAGE=<alpine | ubuntu>
+ sudo docker build -t \
+ nexus3.onap.org:10003/onap/aai-common-${BASE_IMAGE}:${NEW_VERSION} \
+ -f Dockerfile.${BASE_IMAGE} .
```
-Replace the NEW\_VERSION with the new docker image version for aai-common
+Replace the **NEW\_VERSION** with the new docker image version for aai-common.
+Set **BASE\_IMAGE** to **alpine** or **ubuntu** to build aai-common-alpine or
+aai-common-ubuntu image.
+
+NOTE: In order to push images into Nexus3, you have to be logged into Nexus3
+with appropriate credentials first.
+
+NOTE2: Both alpine and ubuntu based aai-common images are built automatically
+by jenkins jobs and they are available at official ONAP docker registry
+(currently nexus3).