From 97e4aaf8d8dc0388463c003c881e2a431c6c3dc7 Mon Sep 17 00:00:00 2001 From: Volodymyr Pochtar Date: Thu, 22 Sep 2022 16:36:22 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20replace=20openjdk=20with=20amazoncorret?= =?UTF-8?q?to:17.0.4=20on=20connectors=20for=20se=D1=81urity=20compliance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bases/base-java/Dockerfile | 6 ++++-- .../base-standard-source-test-file/Dockerfile | 18 ++++-------------- airbyte-integrations/bases/base/Dockerfile | 2 +- .../bases/standard-source-test/Dockerfile | 18 ++++-------------- .../connectors/destination-s3/Dockerfile | 7 +++---- .../destination-snowflake/Dockerfile | 2 +- tools/bin/build_image.sh | 2 +- 7 files changed, 18 insertions(+), 37 deletions(-) diff --git a/airbyte-integrations/bases/base-java/Dockerfile b/airbyte-integrations/bases/base-java/Dockerfile index be4a2abd1db5..e6da294f31f0 100644 --- a/airbyte-integrations/bases/base-java/Dockerfile +++ b/airbyte-integrations/bases/base-java/Dockerfile @@ -1,7 +1,9 @@ -ARG JDK_VERSION=17.0.1 -FROM openjdk:${JDK_VERSION}-slim +ARG JDK_VERSION=17.0.4 +FROM amazoncorretto:${JDK_VERSION} COPY --from=airbyte/integration-base:dev /airbyte /airbyte +RUN yum install -y tar openssl && yum clean all + WORKDIR /airbyte COPY javabase.sh . diff --git a/airbyte-integrations/bases/base-standard-source-test-file/Dockerfile b/airbyte-integrations/bases/base-standard-source-test-file/Dockerfile index 6d7bb0867774..82faf3f5efad 100644 --- a/airbyte-integrations/bases/base-standard-source-test-file/Dockerfile +++ b/airbyte-integrations/bases/base-standard-source-test-file/Dockerfile @@ -1,22 +1,12 @@ -ARG JDK_VERSION=17.0.1 -FROM openjdk:${JDK_VERSION}-slim +ARG JDK_VERSION=17.0.4 +FROM amazoncorretto:${JDK_VERSION} ARG DOCKER_BUILD_ARCH=amd64 # Install Docker to launch worker images. Eventually should be replaced with Docker-java. # See https://gitter.im/docker-java/docker-java?at=5f3eb87ba8c1780176603f4e for more information on why we are not currently using Docker-java -RUN apt-get update && apt-get install -y \ - apt-transport-https \ - ca-certificates \ - curl \ - gnupg-agent \ - software-properties-common -RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - -RUN add-apt-repository \ - "deb [arch=${DOCKER_BUILD_ARCH}] https://download.docker.com/linux/debian \ - $(lsb_release -cs) \ - stable" -RUN apt-get update && apt-get install -y docker-ce-cli jq +RUN amazon-linux-extras install -y docker +RUN yum install -y openssl jq tar && yum clean all ENV APPLICATION base-standard-source-test-file diff --git a/airbyte-integrations/bases/base/Dockerfile b/airbyte-integrations/bases/base/Dockerfile index 32fe5b715134..b70c2b97a1f8 100644 --- a/airbyte-integrations/bases/base/Dockerfile +++ b/airbyte-integrations/bases/base/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:10.5-slim +FROM amazonlinux:2022.0.20220831.1 WORKDIR /airbyte diff --git a/airbyte-integrations/bases/standard-source-test/Dockerfile b/airbyte-integrations/bases/standard-source-test/Dockerfile index 708fd59d233a..eae2c7f1cf6d 100644 --- a/airbyte-integrations/bases/standard-source-test/Dockerfile +++ b/airbyte-integrations/bases/standard-source-test/Dockerfile @@ -1,22 +1,12 @@ -ARG JDK_VERSION=17.0.1 -FROM openjdk:${JDK_VERSION}-slim +ARG JDK_VERSION=17.0.4 +FROM amazoncorretto:${JDK_VERSION} ARG DOCKER_BUILD_ARCH=amd64 # Install Docker to launch worker images. Eventually should be replaced with Docker-java. # See https://gitter.im/docker-java/docker-java?at=5f3eb87ba8c1780176603f4e for more information on why we are not currently using Docker-java -RUN apt-get update && apt-get install -y \ - apt-transport-https \ - ca-certificates \ - curl \ - gnupg-agent \ - software-properties-common -RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - -RUN add-apt-repository \ - "deb [arch=${DOCKER_BUILD_ARCH}] https://download.docker.com/linux/debian \ - $(lsb_release -cs) \ - stable" -RUN apt-get update && apt-get install -y docker-ce-cli jq +RUN amazon-linux-extras install -y docker +RUN yum install -y openssl jq tar && yum clean all ENV APPLICATION standard-source-test diff --git a/airbyte-integrations/connectors/destination-s3/Dockerfile b/airbyte-integrations/connectors/destination-s3/Dockerfile index 008f766e9ac5..96b7b1227ee0 100644 --- a/airbyte-integrations/connectors/destination-s3/Dockerfile +++ b/airbyte-integrations/connectors/destination-s3/Dockerfile @@ -19,12 +19,11 @@ RUN /bin/bash -c 'set -e && \ ARCH=`uname -m` && \ if [ "$ARCH" == "x86_64" ] || [ "$ARCH" = "amd64" ]; then \ echo "$ARCH" && \ - apt-get update; \ - apt-get install lzop liblzo2-2 liblzo2-dev -y; \ + yum install lzop lzo lzo-dev -y; \ elif [ "$ARCH" == "aarch64" ] || [ "$ARCH" = "arm64" ]; then \ echo "$ARCH" && \ - apt-get update; \ - apt-get install lzop liblzo2-2 liblzo2-dev wget curl unzip zip build-essential maven git -y; \ + yum group install -y "Development Tools" \ + yum install lzop lzo lzo-dev wget curl unzip zip maven git -y; \ wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz -P /tmp; \ cd /tmp && tar xvfz lzo-2.10.tar.gz; \ cd /tmp/lzo-2.10/ && ./configure --enable-shared --prefix /usr/local/lzo-2.10; \ diff --git a/airbyte-integrations/connectors/destination-snowflake/Dockerfile b/airbyte-integrations/connectors/destination-snowflake/Dockerfile index 7cca922d3994..47e84df50aa0 100644 --- a/airbyte-integrations/connectors/destination-snowflake/Dockerfile +++ b/airbyte-integrations/connectors/destination-snowflake/Dockerfile @@ -1,7 +1,7 @@ FROM airbyte/integration-base-java:dev # uncomment to run Yourkit java profiling -#RUN apt-get update && apt-get install -y curl zip +#RUN yum install -y curl zip # #RUN curl -o /tmp/YourKit-JavaProfiler-2021.3-docker.zip https://www.yourkit.com/download/docker/YourKit-JavaProfiler-2021.3-docker.zip && \ # unzip /tmp/YourKit-JavaProfiler-2021.3-docker.zip -d /usr/local && \ diff --git a/tools/bin/build_image.sh b/tools/bin/build_image.sh index 6d6ee8346abb..9684d07d6116 100755 --- a/tools/bin/build_image.sh +++ b/tools/bin/build_image.sh @@ -42,7 +42,7 @@ if [ "$FOLLOW_SYMLINKS" == "true" ]; then # to use as the build context tar cL "${exclusions[@]}" . | docker build - "${args[@]}" else - JDK_VERSION="${JDK_VERSION:-17.0.1}" + JDK_VERSION="${JDK_VERSION:-17.0.4}" if [[ -z "${DOCKER_BUILD_PLATFORM}" ]]; then docker build --build-arg JDK_VERSION="$JDK_VERSION" --build-arg DOCKER_BUILD_ARCH="$DOCKER_BUILD_ARCH" . "${args[@]}" else