Thanks for the suggestion. I tried to fix dependencies and it works with default-ignite-config.xml, which means when CONFIG_URI ARG is not provided. When I pass my custom node configuration file which contains KubernetesIP finder, the container fails to find the K8 Ip finder class. I have verified that the container /libs/optional/ directory has ignite-kuberenetes and zookeper jars in it. So is it genuine error or if I deploy this in kubernetes as stateful set after using this image, it would work
Here is my updated Dockerfile FROM adoptopenjdk/openjdk11 # Settings ARG IGNITE_CFG_XML="node-configuration.xml" ARG IGNITE_VERSION="2.11.0" ENV IGNITE_HOME /opt/ignite/apache-ignite ENV CONFIG_URI config/$IGNITE_CFG_XML # Disabling quiet mode. ENV IGNITE_QUIET=false WORKDIR /opt/ignite # Add missing software RUN apt-get update &&\ apt-get install bash && \ apt-get install -y wget && \ apt-get install unzip && \ wget https://dlcdn.apache.org//ignite/${IGNITE_VERSION}/apache-ignite-${IGNITE_VERSION}-bin.zip && \ unzip -o apache-ignite-${IGNITE_VERSION}-bin.zip && \ mv apache-ignite-${IGNITE_VERSION}-bin apache-ignite && \ rm apache-ignite-${IGNITE_VERSION}-bin.zip # Copy main binary archive #COPY apache-ignite* apache-ignite # Copy sh files and set permission COPY run.sh $IGNITE_HOME/ COPY ./$IGNITE_CFG_XML $IGNITE_HOME/config # Grant permission to copy optional libs RUN chmod 777 ${IGNITE_HOME}/libs # Grant permission to create work directory RUN chmod 777 ${IGNITE_HOME} # Grant permission to execute entry point RUN chmod 555 $IGNITE_HOME/run.sh # Entry point CMD $IGNITE_HOME/run.sh # Container port exposure EXPOSE 11211 47100 47500 49112 10800 8080 On Wed, Nov 17, 2021 at 5:49 PM Surinder Mehra <redni...@gmail.com> wrote: > Yes, thanks for replying. I tried doing that but it assumes the ignite > binary is present in the local directory somewhere. " COPY apache-ignite* > apache-ignite " > Could you please explain > 1. where is it reading ignite binaries from and > 2. ignite binaries zip doesn't have run.sh. If I copy run.sh as well along > with Dockerfile from github, does it have any other dependency. > > On Wed, Nov 17, 2021 at 4:51 PM Stephen Darlington < > stephen.darling...@gridgain.com> wrote: > >> I’d just take the original Dockerfile (Dockerfile >> <https://github.com/apache/ignite/blob/master/deliveries/docker/apache-ignite/x86_64/Dockerfile>) >> and replace the reference to Java 8 with Java 11 >> >> On 17 Nov 2021, at 10:50, Surinder Mehra <redni...@gmail.com> wrote: >> >> Hi, >> I tried to build one with two approaches. I was thinking the 1st one is >> simple and should work but it didn't so I tried the 2nd approach which >> seems to be missing something. Can you point out the missing piece please. >> >> 1. Extend base image and update java home as below >> FROM apacheignite/ignite >> >> ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64 >> # Install OpenJDK-11 >> RUN apt-get update && \ >> apt-get install -y openjdk-11-jdk && \ >> export JAVA_HOME && \ >> apt-get clean; >> RUN export JAVA_HOME="$(dirname $(dirname $(readlink -f $(which java))))" >> >> This throws an error "apt-get not found". I tried with yum as well, but >> it throws the same error. Not sure why it doesn't have package manager >> >> 2. On the 2nd approach I tried to use jdk11 as base image and install >> ignite on it and run /bin/ignite.sh. It throws an error saying it cant find >> executable on path. >> >> FROM adoptopenjdk/openjdk11 >> >> # Set Apache Ignite configuration file name. >> ARG IGNITE_CFG_XML="node-configuration.xml" >> >> # Set Apache Ignite version. >> ARG IGNITE_VERSION="2.11.0" >> >> # Set IGNITE_HOME variable. >> ENV IGNITE_HOME /opt/ignite/apache-ignite-${IGNITE_VERSION}-bin >> >> # Set a path to the Apache Ignite configuration file. Use the run.sh script >> below: >> ENV CONFIG_URI ${IGNITE_HOME}/config/$IGNITE_CFG_XML >> >> # Make sure the Kubernetes lib is copied to the 'libs' folder. >> #ENV OPTION_LIBS ignite-kubernetes >> >> # Disabling quiet mode. >> ENV IGNITE_QUIET=false >> WORKDIR /opt/ignite >> # Install or update needed tools. >> #RUN apt-get update && apt-get install -y --no-install-recommends unzip >> RUN apt-get update && \ >> apt-get install -y wget && \ >> apt-get install unzip && \ >> wget >> https://dlcdn.apache.org//ignite/${IGNITE_VERSION}/apache-ignite-${IGNITE_VERSION}-bin.zip >> # Creating and setting a working directory for following commands. >> >> # Copying local Apache Ignite build to the docker image. >> #COPY ./apache-ignite-${IGNITE_VERSION}-bin.zip >> apache-ignite-${IGNITE_VERSION}-bin.zip >> >> # Unpacking the build. >> RUN unzip apache-ignite-${IGNITE_VERSION}-bin.zip >> RUN rm apache-ignite-${IGNITE_VERSION}-bin.zip >> >> # Copying the executable file and setting permissions. >> >> RUN chmod +x $IGNITE_HOME/bin/ignite.sh >> >> # Copy the configuration. >> #COPY ./$IGNITE_CFG_XML $IGNITE_HOME/config >> >> #RUN $IGNITE_HOME/bin/ignite.sh >> # Start an Apache Ignite node. >> CMD $IGNITE_HOME/bin/ignite.sh >> #$IGNITE_HOME/config/$IGNITE_CFG_XML >> >> # Exposing the ports. >> #EXPOSE 11211 47100 47500 49112 >> EXPOSE 10800 11211 47100 11211 47100 47500 49112 >> >> >> >> On Tue, Nov 16, 2021 at 3:51 PM Stephen Darlington < >> stephen.darling...@gridgain.com> wrote: >> >>> I don’t see an image with Java 11. I think you’d have to build your own. >>> >>> There are tickets for this: >>> https://issues.apache.org/jira/browse/IGNITE-14031 and >>> https://issues.apache.org/jira/browse/IGNITE-15209 >>> >>> On 16 Nov 2021, at 09:55, Surinder Mehra <redni...@gmail.com> wrote: >>> >>> Hi, >>> I followed below link to deploy ignite pod on kubernetes. It uses apache >>> ignite 2.11 docker image which has java openjdk 8. Is there a way to >>> configure java 11 on this pod or ignite image with jdk11 ? >>> >>> >>> https://ignite.apache.org/docs/latest/installation/kubernetes/amazon-eks-deployment >>> >>> >>> >>> >> >>