blob: 9a082a0a95de8cdc1a3dab8dba44f705ee9017e4 [file]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM eclipse-temurin:11 AS jre-build
RUN $JAVA_HOME/bin/jlink \
--add-modules java.base,java.desktop,java.logging,java.naming,java.net.http,java.prefs,java.scripting,java.sql,java.xml,jdk.unsupported,jdk.zipfs \
--strip-debug \
--no-man-pages \
--no-header-files \
--compress=2 \
--output /javaruntime
# Same base image as eclipse-temurin
FROM ubuntu:22.04
ENV JAVA_HOME=/opt/java/openjdk
ENV PATH="${JAVA_HOME}/bin:${PATH}"
COPY --from=jre-build /javaruntime $JAVA_HOME
# Copy and setup CLI app
ENV IGNITE_CLI_HOME=/opt/ignite3cli
ENV IGNITE_CLI_WORK_DIR=/opt/ignite3cli/work
COPY dist/cli $IGNITE_CLI_HOME
# Make sure the locale is UTF-8 so that CLI prints tables correctly
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
WORKDIR $IGNITE_CLI_HOME
# Use the CLI script directly as entrypoint for proper TTY handling
ENTRYPOINT ["/opt/ignite3cli/bin/ignite3"]