Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace openjdk with amazoncorretto:17.0.4 on connectors for seсurity compliance #17511

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions airbyte-integrations/bases/base-java/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 .
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/bases/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:10.5-slim
FROM amazonlinux:2022.0.20220831.1

WORKDIR /airbyte

Expand Down
18 changes: 4 additions & 14 deletions airbyte-integrations/bases/standard-source-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
7 changes: 3 additions & 4 deletions airbyte-integrations/connectors/destination-s3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
Original file line number Diff line number Diff line change
@@ -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 && \
Expand Down
2 changes: 1 addition & 1 deletion tools/bin/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious what prompted the version bump here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest amazoncorretto:17.0.1 is 9 months old already and can have some outdated packages.

if [[ -z "${DOCKER_BUILD_PLATFORM}" ]]; then
docker build --build-arg JDK_VERSION="$JDK_VERSION" --build-arg DOCKER_BUILD_ARCH="$DOCKER_BUILD_ARCH" . "${args[@]}"
else
Expand Down