Skip to content

Commit

Permalink
Use the Airbyte Base Java Image for all services (airbytehq#17843)
Browse files Browse the repository at this point in the history
* Use the Amazon Corretto based base image for all services

* Add comment

* Use airbyte-base-java-image
  • Loading branch information
jdpgrailsdev authored and jhammarstedt committed Oct 31, 2022
1 parent 26d6cb9 commit 46b6cf3
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 15 deletions.
3 changes: 1 addition & 2 deletions airbyte-bootloader/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG JDK_VERSION=17.0.4
ARG JDK_IMAGE=amazoncorretto:${JDK_VERSION}
ARG JDK_IMAGE=airbyte/airbyte-base-java-image:1.0
FROM ${JDK_IMAGE}

ARG VERSION=0.40.14
Expand Down
3 changes: 1 addition & 2 deletions airbyte-container-orchestrator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG JDK_VERSION=17.0.4
ARG JDK_IMAGE=amazoncorretto:${JDK_VERSION}
ARG JDK_IMAGE=airbyte/airbyte-base-java-image:1.0
FROM ${JDK_IMAGE} AS orchestrator

ARG DOCKER_BUILD_ARCH=amd64
Expand Down
3 changes: 1 addition & 2 deletions airbyte-cron/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG JDK_VERSION=17.0.4
ARG JDK_IMAGE=amazoncorretto:${JDK_VERSION}
ARG JDK_IMAGE=airbyte/airbyte-base-java-image:1.0
FROM ${JDK_IMAGE} AS cron

ARG VERSION=0.40.14
Expand Down
3 changes: 1 addition & 2 deletions airbyte-metrics/reporter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG JDK_VERSION=17.0.4
ARG JDK_IMAGE=amazoncorretto:${JDK_VERSION}
ARG JDK_IMAGE=airbyte/airbyte-base-java-image:1.0
FROM ${JDK_IMAGE} AS metrics-reporter

ARG VERSION=0.40.14
Expand Down
3 changes: 1 addition & 2 deletions airbyte-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG JDK_VERSION=17.0.4
ARG JDK_IMAGE=amazoncorretto:${JDK_VERSION}
ARG JDK_IMAGE=airbyte/airbyte-base-java-image:1.0
FROM ${JDK_IMAGE} AS server

EXPOSE 8000
Expand Down
3 changes: 1 addition & 2 deletions airbyte-workers/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG JDK_VERSION=17.0.4
ARG JDK_IMAGE=amazoncorretto:${JDK_VERSION}
ARG JDK_IMAGE=airbyte/airbyte-base-java-image:1.0
FROM ${JDK_IMAGE} AS worker

ARG DOCKER_BUILD_ARCH=amd64
Expand Down
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,13 @@ subprojects { subproj ->

def arch = System.getenv('BUILD_ARCH') ?: System.getProperty("os.arch").toLowerCase()
def isArm64 = arch == "aarch64" || arch == "arm64"

def buildArch = System.getenv('DOCKER_BUILD_ARCH') ?: isArm64 ? 'arm64' : 'amd64'
def buildPlatform = System.getenv('DOCKER_BUILD_PLATFORM') ?: isArm64 ? 'linux/arm64' : 'linux/amd64'
def alpineImage = System.getenv('ALPINE_IMAGE') ?: isArm64 ? 'arm64v8/alpine:3.14' : 'amd64/alpine:3.14'
def nginxImage = System.getenv('NGINX_IMAGE') ?: isArm64 ? 'arm64v8/nginx:alpine' : 'amd64/nginx:alpine'
def openjdkImage = System.getenv('JDK_IMAGE') ?: isArm64 ? "arm64v8/amazoncorretto:17.0.4" : "amd64/amazoncorretto:17.0.4"
def buildArch = System.getenv('DOCKER_BUILD_ARCH') ?: isArm64 ? 'arm64' : 'amd64'

// Used by the platform -- Must be an Amazon Corretto-based image for build to work without modification to Dockerfile instructions
def openjdkImage = System.getenv('JDK_IMAGE') ?: "airbyte/airbyte-base-java-image:1.0"

platform = buildPlatform
images.add("airbyte/$subproj.dockerImageName:$rootProject.ext.image_tag")
Expand Down

0 comments on commit 46b6cf3

Please sign in to comment.