Skip to content
Closed
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
12 changes: 6 additions & 6 deletions core/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM registry.access.redhat.com/ubi8/ubi
ARG AZUL_DOCKER_TAG
FROM azul/zulu-openjdk:$AZUL_DOCKER_TAG

ENV JAVA_HOME /usr/lib/jvm/zulu17

RUN \
set -xeu && \
yum -y -q install https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm && \
yum -y -q install python3 zulu17-jdk less && \
yum -q clean all && \
rm -rf /var/cache/yum && \
alternatives --set python /usr/bin/python3 && \
apt-get update -q && \
apt-get install -y -q less python3 curl && \
rm -rf /var/lib/apt/lists/* && \
groupadd trino --gid 1000 && \
useradd trino --uid 1000 --gid 1000 --create-home && \
mkdir -p /usr/lib/trino /data/trino && \
Expand Down
12 changes: 9 additions & 3 deletions core/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,25 @@ Builds the Trino Docker image
-h Display help
-a Build the specified comma-separated architectures, defaults to amd64,arm64
-r Build the specified Trino release version, downloads all required artifacts
-j Azul JDK version as published in https://hub.docker.com/r/azul/zulu-openjdk
EOF
}

ARCHITECTURES=(amd64 arm64)
TRINO_VERSION=
AZUL_DOCKER_TAG="17.0.4"

while getopts ":a:h:r:" o; do
while getopts ":a:h:r:j:" o; do
case "${o}" in
a)
IFS=, read -ra ARCHITECTURES <<< "$OPTARG"
;;
r)
TRINO_VERSION=${OPTARG}
;;
j)
AZUL_DOCKER_TAG=${OPTARG}
;;
h)
usage
exit 0
Expand Down Expand Up @@ -70,14 +75,15 @@ cp -R default "${WORK_DIR}/"
TAG_PREFIX="trino:${TRINO_VERSION}"

for arch in "${ARCHITECTURES[@]}"; do
echo "🫙 Building the image for $arch"
echo "🫙 Building the image for $arch using azul/zulu-openjdk:${AZUL_DOCKER_TAG} as a base"
docker build \
"${WORK_DIR}" \
--pull \
--platform "linux/$arch" \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like they still publish images as linux/arm64/v8, not linux/arm64 as before they broke it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Is that a problem? It's the same as the ubuntu image, for example.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think this is a different issue

The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested

We'll have to wait for them to fix this before merging.

-f Dockerfile \
-t "${TAG_PREFIX}-$arch" \
--build-arg "TRINO_VERSION=${TRINO_VERSION}"
--build-arg "TRINO_VERSION=${TRINO_VERSION}" \
--build-arg "AZUL_DOCKER_TAG=${AZUL_DOCKER_TAG}"
done

echo "🧹 Cleaning up the build context directory"
Expand Down