Update Dockerfile to use azul Java7 image and fix JAVA paths

This commit is contained in:
Antonio ISTI 2023-09-19 17:44:06 +02:00
parent 54ec7ff066
commit 790ecdcf49
1 changed files with 10 additions and 7 deletions

View File

@ -1,12 +1,13 @@
# The latest is 7u221. An exact build can be specified
FROM openjdk:7-slim
FROM azul/zulu-openjdk:7u352
ARG JAVA_OPTS="-Xms2000M -Xmx2800M"
ENV JAVA_OPTS=$JAVA_OPTS
ENV J2SDKDIR=/docker-java-home
ENV J2REDIR=/docker-java-home/jre
ENV PATH=/docker-java-home/bin:/docker-java-home/db/bin:/docker-java-home/jre/bin:$PATH
ENV JAVA_HOME=/docker-java-home
ENV DERBY_HOME=/docker-java-home/db
ENV J2SDKDIR=/usr/lib/jvm/zulu7
ENV J2REDIR=/usr/lib/jvm/zulu7/jre
ENV JAVA_HOME=/usr/lib/jvm/zulu7
ENV PATH=$JAVA_HOME/bin:$JAVA_HOME/db/bin:$JAVA_HOME/jre/bin:$PATH
# ENV DERBY_HOME=/docker-java-home/db
ENV USER=gcube
ENV GLOBUS_LOCATION=/home/gcube/gCore
ENV ANT_HOME=$GLOBUS_LOCATION
@ -16,8 +17,10 @@ ENV PATH=$GLOBUS_LOCATION/bin:$PATH
ENV GLOBUS_OPTIONS=""
RUN adduser --system --gecos "Gcube service user" --disabled-password --disabled-login --uid 333 --shell /usr/sbin/nologin gcube
RUN apt-get update
RUN apt-get install -y wget
WORKDIR /home/gcube
RUN apt-get update && apt-get install -y wget && cd /home/gcube && wget https://nexus.d4science.org/nexus/content/repositories/gcube-staging-gcore/org/gcube/distribution/ghn-distribution/7.0.1-4.16.0-144317/ghn-distribution-7.0.1-4.16.0-144317.tar.gz && tar zxf ghn-distribution-7.0.1-4.16.0-144317.tar.gz && rm -f ghn-distribution-7.0.1-4.16.0-144317.tar.gz && mkdir -p /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc && chown gcube /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc
RUN cd /home/gcube && wget https://nexus.d4science.org/nexus/content/repositories/gcube-staging-gcore/org/gcube/distribution/ghn-distribution/7.0.1-4.16.0-144317/ghn-distribution-7.0.1-4.16.0-144317.tar.gz && tar zxf ghn-distribution-7.0.1-4.16.0-144317.tar.gz && rm -f ghn-distribution-7.0.1-4.16.0-144317.tar.gz && mkdir -p /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc && chown gcube /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc
COPY src/gcube-start-container.sh /home/gcube/gCore/bin/gcore-start-container
RUN chmod 755 /home/gcube/gCore/bin/gcore-start-container
EXPOSE 8080