Skip to content

Commit

Permalink
Use Amazon Linux 2023 as the base image for the Data Prepper Docker i…
Browse files Browse the repository at this point in the history
…mage. This install Temurin for the Amazon Linux 2 distribution. Resolves opensearch-project#3505. (opensearch-project#3671)

Signed-off-by: David Venable <[email protected]>
  • Loading branch information
dlvenable authored Nov 17, 2023
1 parent c453dd0 commit 30d88f9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
13 changes: 9 additions & 4 deletions release/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM eclipse-temurin:17-jre-jammy
FROM public.ecr.aws/amazonlinux/amazonlinux:2023

ARG PIPELINE_FILEPATH
ARG CONFIG_FILEPATH
ARG ARCHIVE_FILE
Expand All @@ -9,9 +10,13 @@ ENV ENV_CONFIG_FILEPATH=$CONFIG_FILEPATH
ENV ENV_PIPELINE_FILEPATH=$PIPELINE_FILEPATH

# Update all packages
RUN apt -y update
RUN apt -y install bash bc
RUN apt -y full-upgrade
RUN dnf -y update
RUN dnf -y install bash bc
RUN dnf -y upgrade

# Setup the Adoptium package repo and install Temurin Java
ADD adoptium.repo /etc/yum.repos.d/adoptium.repo
RUN dnf -y install temurin-17-jdk

RUN mkdir -p /var/log/data-prepper
ADD $ARCHIVE_FILE /usr/share
Expand Down
6 changes: 6 additions & 0 deletions release/docker/adoptium.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[adoptium]
name=Adoptium
baseurl=https://packages.adoptium.net/artifactory/rpm/amazonlinux/2/$basearch
enabled=1
gpgcheck=1
gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public
1 change: 1 addition & 0 deletions release/docker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ docker {
tag "${project.rootProject.name}", "${project.version}"
files project(':release:archives:linux').tasks.getByName('linuxx64DistTar').archivePath
files "${project.projectDir}/config/default-data-prepper-config.yaml", "${project.projectDir}/config/default-keystore.p12"
files 'adoptium.repo'
buildArgs(['ARCHIVE_FILE' : project(':release:archives:linux').tasks.getByName('linuxx64DistTar').archiveFileName.get(),
'ARCHIVE_FILE_UNPACKED' : project(':release:archives:linux').tasks.getByName('linuxx64DistTar').archiveFileName.get().replace('.tar.gz', ''),
'CONFIG_FILEPATH' : '/usr/share/data-prepper/config/data-prepper-config.yaml',
Expand Down

0 comments on commit 30d88f9

Please sign in to comment.