From fd0e8eef53f46e2c8f168f11e2871347435b9dbe Mon Sep 17 00:00:00 2001 From: Volodymyr Pochtar Date: Tue, 11 Oct 2022 11:53:14 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"feat:=20replace=20openjdk=20with=20am?= =?UTF-8?q?azoncorretto:17.0.4=20on=20connectors=20for=20se=D1=81urity=20c?= =?UTF-8?q?ompliance=20(#17511)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ab71f5bc29cc9aaea4dd06385c391f135dc23d30. --- .../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, 37 insertions(+), 18 deletions(-) diff --git a/airbyte-integrations/bases/base-java/Dockerfile b/airbyte-integrations/bases/base-java/Dockerfile index e6da294f31f08..be4a2abd1db5a 100644 --- a/airbyte-integrations/bases/base-java/Dockerfile +++ b/airbyte-integrations/bases/base-java/Dockerfile @@ -1,9 +1,7 @@ -ARG JDK_VERSION=17.0.4 -FROM amazoncorretto:${JDK_VERSION} +ARG JDK_VERSION=17.0.1 +FROM openjdk:${JDK_VERSION}-slim 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 82faf3f5efad7..6d7bb08677744 100644 --- a/airbyte-integrations/bases/base-standard-source-test-file/Dockerfile +++ b/airbyte-integrations/bases/base-standard-source-test-file/Dockerfile @@ -1,12 +1,22 @@ -ARG JDK_VERSION=17.0.4 -FROM amazoncorretto:${JDK_VERSION} +ARG JDK_VERSION=17.0.1 +FROM openjdk:${JDK_VERSION}-slim 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 amazon-linux-extras install -y docker -RUN yum install -y openssl jq tar && yum clean all +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 ENV APPLICATION base-standard-source-test-file diff --git a/airbyte-integrations/bases/base/Dockerfile b/airbyte-integrations/bases/base/Dockerfile index b70c2b97a1f8a..32fe5b7151346 100644 --- a/airbyte-integrations/bases/base/Dockerfile +++ b/airbyte-integrations/bases/base/Dockerfile @@ -1,4 +1,4 @@ -FROM amazonlinux:2022.0.20220831.1 +FROM debian:10.5-slim WORKDIR /airbyte diff --git a/airbyte-integrations/bases/standard-source-test/Dockerfile b/airbyte-integrations/bases/standard-source-test/Dockerfile index eae2c7f1cf6d4..708fd59d233a7 100644 --- a/airbyte-integrations/bases/standard-source-test/Dockerfile +++ b/airbyte-integrations/bases/standard-source-test/Dockerfile @@ -1,12 +1,22 @@ -ARG JDK_VERSION=17.0.4 -FROM amazoncorretto:${JDK_VERSION} +ARG JDK_VERSION=17.0.1 +FROM openjdk:${JDK_VERSION}-slim 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 amazon-linux-extras install -y docker -RUN yum install -y openssl jq tar && yum clean all +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 ENV APPLICATION standard-source-test diff --git a/airbyte-integrations/connectors/destination-s3/Dockerfile b/airbyte-integrations/connectors/destination-s3/Dockerfile index 96b7b1227ee00..008f766e9ac53 100644 --- a/airbyte-integrations/connectors/destination-s3/Dockerfile +++ b/airbyte-integrations/connectors/destination-s3/Dockerfile @@ -19,11 +19,12 @@ RUN /bin/bash -c 'set -e && \ ARCH=`uname -m` && \ if [ "$ARCH" == "x86_64" ] || [ "$ARCH" = "amd64" ]; then \ echo "$ARCH" && \ - yum install lzop lzo lzo-dev -y; \ + apt-get update; \ + apt-get install lzop liblzo2-2 liblzo2-dev -y; \ elif [ "$ARCH" == "aarch64" ] || [ "$ARCH" = "arm64" ]; then \ echo "$ARCH" && \ - yum group install -y "Development Tools" \ - yum install lzop lzo lzo-dev wget curl unzip zip maven git -y; \ + apt-get update; \ + apt-get install lzop liblzo2-2 liblzo2-dev wget curl unzip zip build-essential 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 47e84df50aa07..7cca922d3994c 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 yum install -y curl zip +#RUN apt-get update && apt-get 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 9684d07d61162..6d6ee8346abb9 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.4}" + JDK_VERSION="${JDK_VERSION:-17.0.1}" if [[ -z "${DOCKER_BUILD_PLATFORM}" ]]; then docker build --build-arg JDK_VERSION="$JDK_VERSION" --build-arg DOCKER_BUILD_ARCH="$DOCKER_BUILD_ARCH" . "${args[@]}" else