From f0f1561ebc988c8db6d7b9d63e4713597ead14fa Mon Sep 17 00:00:00 2001 From: Dmitry Puzikov Date: Fri, 12 Apr 2019 11:21:58 +0200 Subject: Fix missed libraries Install missed libcurl3(libcurl.so.4 by OpenSSL) required by embedded mongo on arm64 in some inherited images. Change-Id: Ie2684c42d5c6330aea553dc708817a87e4abf36b Issue-ID: INT-1024 Signed-off-by: Dmitry Puzikov --- Dockerfiles/aai-common/Dockerfile | 35 ------------------------------- Dockerfiles/aai-common/Dockerfile.alpine | 36 ++++++++++++++++++++++++++++++++ Dockerfiles/aai-common/Dockerfile.ubuntu | 35 +++++++++++++++++++++++++++++++ Dockerfiles/aai-common/README.md | 3 ++- 4 files changed, 73 insertions(+), 36 deletions(-) delete mode 100644 Dockerfiles/aai-common/Dockerfile create mode 100644 Dockerfiles/aai-common/Dockerfile.alpine create mode 100644 Dockerfiles/aai-common/Dockerfile.ubuntu (limited to 'Dockerfiles') diff --git a/Dockerfiles/aai-common/Dockerfile b/Dockerfiles/aai-common/Dockerfile deleted file mode 100644 index fb7b6671..00000000 --- a/Dockerfiles/aai-common/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -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/Dockerfile.alpine b/Dockerfiles/aai-common/Dockerfile.alpine new file mode 100644 index 00000000..0ca3a6f2 --- /dev/null +++ b/Dockerfiles/aai-common/Dockerfile.alpine @@ -0,0 +1,36 @@ +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 \ + jq \ + loksh \ + bash \ + netcat-openbsd \ + openssl \ + shadow \ + util-linux \ + wget" \ + && apk add --no-cache ${DEPS} \ + # 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.ubuntu b/Dockerfiles/aai-common/Dockerfile.ubuntu new file mode 100644 index 00000000..df9c2470 --- /dev/null +++ b/Dockerfiles/aai-common/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 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 diff --git a/Dockerfiles/aai-common/README.md b/Dockerfiles/aai-common/README.md index e61c63fb..0726e26b 100644 --- a/Dockerfiles/aai-common/README.md +++ b/Dockerfiles/aai-common/README.md @@ -7,7 +7,8 @@ Run the following command if building the image in internal network ```bash export NEW_VERSION= docker build \ - -t aaionap/aai-common:${NEW_VERSION} . + -t aaionap/aai-common:${NEW_VERSION}${BASE_TAG:-"-alpine"} -f . ``` Replace the NEW\_VERSION with the new docker image version for aai-common +If different based images are required replace BASE\_TAG accordingly to the base image used. -- cgit 1.2.3-korg