NoIssue: A lot of cleanup and generalizations

This commit is contained in:
2026-02-01 11:06:49 +01:00
parent d3e859a094
commit a2fae04892
8 changed files with 76 additions and 46 deletions

View File

@@ -1,39 +1,42 @@
FROM dockerreg.r35157.com/r35157/jre:24.0.1-4_amd64
FROM dockerreg.r35157.com/r35157/jre:_JREVERSION__amd64
LABEL maintainer="Minimons <minimons@r35157.com>"
# Setup environment
ENV NENJIMHUB_HOME=/usr/local/software/nenjimhub
ENV APP_HOME=/usr/local/software/nenjimhub
WORKDIR /usr/local/software
USER root
RUN mkdir nenjimhub-_VERSION_
RUN ln -s nenjimhub-_VERSION_ nenjimhub
RUN mkdir nenjimhub-_VERSION_ \
&& ln -s nenjimhub-_VERSION_ nenjimhub
WORKDIR nenjimhub
RUN mkdir libs
# These dirs are expected to be overshadowed by host mounts
RUN mkdir conf logs in out archive
# Install basic tools
RUN apt-get update
RUN apt-get install -y procps
RUN mkdir conf logs
# Set timezone
ENV TZ=Europe/Copenhagen
RUN apt-get update
RUN apt-get install -y tzdata \
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone \
&& dpkg-reconfigure -f noninteractive tzdata
# Clean-up
RUN apt-get autoremove \
RUN apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install application and configuration (Do this as late as possible to be able to reuse layers between builds)
COPY start.sh .
COPY conf/* conf
COPY libs/*.jar libs
COPY conf/* conf/
COPY libs/*.jar libs/
RUN chmod 755 ./start.sh \
&& chmod -R a+rX /usr/local/software/nenjimhub-_VERSION_
USER user:user
CMD ["./start.sh"]