Files
com_r35157_nenjim-kicker-im…/src/main/docker/Dockerfile_template

43 lines
1.0 KiB
Plaintext

FROM dockerreg.r35157.com/r35157/jre:_JREVERSION__amd64
LABEL maintainer="Minimons <minimons@r35157.com>"
# Setup environment
ENV APP_HOME=/usr/local/software/nenjimkicker
WORKDIR /usr/local/software
USER root
RUN mkdir nenjimkicker-_VERSION_ \
&& ln -s nenjimkicker-_VERSION_ nenjimkicker
WORKDIR nenjimkicker
RUN mkdir libs
# These dirs are expected to be overshadowed by host mounts
RUN mkdir conf logs && chown user:user 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 -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 run.sh .
COPY conf/* conf/
COPY libs/*.jar libs/
RUN chmod 755 ./run.sh \
&& chmod -R a+rX /usr/local/software/nenjimkicker-_VERSION_
USER user:user
CMD ["./run.sh"]