2021-08-09 18:04:31 +02:00
# The latest is 7u221. An exact build can be specified
2023-09-19 17:44:06 +02:00
FROM azul/zulu-openjdk:7u352
2021-08-09 18:04:31 +02:00
ARG JAVA_OPTS = "-Xms2000M -Xmx2800M"
ENV JAVA_OPTS = $JAVA_OPTS
2023-09-19 17:44:06 +02:00
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
2023-10-11 16:49:12 +02:00
ENV TZ = "Europe/Rome"
2023-09-19 17:44:06 +02:00
# ENV DERBY_HOME=/docker-java-home/db
2021-08-09 18:04:31 +02:00
ENV USER = gcube
ENV GLOBUS_LOCATION = /home/gcube/gCore
ENV ANT_HOME = $GLOBUS_LOCATION
ENV PATH = $GLOBUS_LOCATION /bin:$PATH
#ENV EXIST_HOME=
#ENV GLOBUS_OPTIONS="-Dexist.home=$EXIST_HOME"
ENV GLOBUS_OPTIONS = ""
2023-09-27 10:07:43 +02:00
ENV USER = $LOGNAME
ENV GCORE_START_OPTIONS = " -DX509_USER_PROXY= $X509_USER_PROXY -Xms2800M -Xmx4800M "
2021-08-09 18:04:31 +02:00
2023-09-18 16:41:58 +02:00
RUN adduser --system --gecos "Gcube service user" --disabled-password --disabled-login --uid 333 --shell /usr/sbin/nologin gcube
2023-09-19 17:44:06 +02:00
RUN apt-get update
2023-09-22 14:23:48 +02:00
RUN apt-get install -y wget
2023-10-25 10:48:00 +02:00
2021-08-09 18:04:31 +02:00
WORKDIR /home/gcube
2023-10-25 10:48:00 +02:00
RUN cd /home/gcube && wget https://nexus.d4science.org/nexus/content/repositories/gcube-releases/org/gcube/distribution/ghn-distribution/7.0.0-4.2.0-132545/ghn-distribution-7.0.0-4.2.0-132545.tar.gz && tar zxf ghn-distribution-7.0.0-4.2.0-132545.tar.gz && rm -f ghn-distribution-7.0.0-4.2.0-132545.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 rm /home/gcube/gCore/lib/accounting-lib-2.3.0-4.2.0-132276.jar
RUN rm /home/gcube/gCore/lib/document-store-lib-1.4.0-4.2.0-135110.jar
RUN rm /home/gcube/gCore/lib/document-store-lib-couchbase-1.2.0-4.2.0-131889.jar
# 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
2023-10-18 09:24:11 +02:00
# add fake-accounting-lib
2023-10-25 10:48:00 +02:00
# RUN rm /home/gcube/gCore/lib/accounting-lib-3.5.0.jar
# RUN rm /home/gcube/gCore/lib/document-store-lib-2.5.0.jar
# RUN rm /home/gcube/gCore/lib/document-store-lib-couchbase-1.6.0-4.16.0-171307.jar
2023-10-18 09:24:11 +02:00
RUN wget -P /home/gcube/gCore/lib https://nexus.d4science.org/nexus/content/repositories/gcube-snapshots/org/gcube/accounting/fake-accounting-lib/3.2.0-SNAPSHOT/fake-accounting-lib-3.2.0-20190311.105710-2.jar
2023-10-25 10:48:00 +02:00
RUN rm /home/gcube/gCore/lib/is-publisher-2.2.0-4.2.0-126946.jar
RUN wget -P /home/gcube/gCore/lib https://nexus.d4science.org/nexus/content/repositories/gcube-releases-gcore/org/gcube/informationsystem/is-publisher/2.2.1-4.15.0-181697/is-publisher-2.2.1-4.15.0-181697.jar
2021-08-09 18:04:31 +02:00
COPY src/gcube-start-container.sh /home/gcube/gCore/bin/gcore-start-container
2023-10-25 11:49:20 +02:00
COPY src/gcore-start-container-daemon /home/gcube/gCore/bin/gcore-start-container-daemon
2023-09-22 14:23:48 +02:00
COPY src/GHNConfig.xml /home/gcube/gCore/config/GHNConfig.xml
2023-10-26 17:11:08 +02:00
COPY src/common-authorization-2.0.2-4.3.0.jar /home/gcube/gCore/lib/common-authorization-2.0.1-4.2.0-139995.jar
2023-10-25 10:48:00 +02:00
COPY src/container-log4j.properties /home/gcube/gCore/
# COPY src/log4j-stdout-appender.patch /home/gcube/gCore/
# RUN cat /home/gcube/gCore/log4j-stdout-appender.patch >> /home/gcube/gCore/container-log4j.properties
# RUN sed -i 's/log4j.rootLogger=ERROR,FULL,LITE/log4j.rootLogger=ERROR,stdout/' /home/gcube/gCore/container-log4j.properties
2023-09-27 10:07:43 +02:00
RUN $GLOBUS_LOCATION /bin/gcore-load-env
2021-08-09 18:04:31 +02:00
RUN chmod 755 /home/gcube/gCore/bin/gcore-start-container
2023-09-25 11:51:43 +02:00
# Remove Resultset from distribution
2023-10-03 15:12:09 +02:00
# RUN /home/gcube/gCore/bin/gcore-undeploy-service org.gcube.common.searchservice.resultsetservice
2023-10-25 10:48:00 +02:00
# RUN /home/gcube/gCore/bin/gcore-undeploy-service resultsetservice-3.1.0-4.16.0-126939
RUN /home/gcube/gCore/bin/gcore-undeploy-service resultsetservice-3.1.0-4.2.0-126939
2023-10-18 11:42:01 +02:00
RUN mkdir /gcube-data && chown gcube.nogroup /gcube-data
2023-10-25 10:48:00 +02:00
2023-09-18 16:41:58 +02:00
USER gcube
2023-10-25 10:48:00 +02:00
EXPOSE 8080
2021-08-09 18:04:31 +02:00
ENTRYPOINT exec /home/gcube/gCore/bin/gcore-start-container
# For Spring-Boot project, use the entrypoint below to reduce Tomcat startup time.
#ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar ansibleplaybookisregistryservice.jar