From f0f4ec4335fa69cce1bf769009cf19a440253644 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Sun, 13 May 2018 17:08:22 +0000 Subject: [PATCH] Add README --- Dockerfile | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4d2bf86..210cc95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,34 @@ -FROM debian -MAINTAINER Jacek Kowalski <Jacek@jacekk.info> +FROM openjdk:7-jre-slim ENV MFI_VERSION 2.1.11 RUN apt-get update \ && apt-get -y dist-upgrade \ - && apt-get -y install wget jsvc openjdk-7-jre-headless mongodb-server binutils unzip \ - && apt-get -y clean + && apt-get -y install --no-install-recommends \ + wget jsvc mongodb-server binutils procps unzip \ + && apt-get -y clean \ + && rm -Rf /var/lib/apt/lists/* RUN cd /tmp \ && wget "http://dl.ubnt.com/mfi/${MFI_VERSION}/mFi.unix.zip" \ && unzip mFi.unix.zip \ - && mv /tmp/mFi /usr/lib/mfi + && rm mFi.unix.zip \ + && mv /tmp/mFi /usr/lib/mfi \ + && cp -Rf /usr/lib/mfi/data /usr/lib/mfi/data-orig \ + && groupadd -r -g 500 mfi \ + && useradd -r -d /usr/lib/mfi -u 500 -g 500 mfi \ + && mkdir -p /var/lib/mfi \ + && chown -Rf mfi:mfi /usr/lib/mfi /var/lib/mfi EXPOSE 6080 6443 VOLUME /usr/lib/mfi/data WORKDIR /var/lib/mfi -CMD ["/usr/bin/java", "-Xmx1024M", "-jar", "/usr/lib/mfi/lib/ace.jar", "start"] +COPY run.sh /run.sh +CMD /run.sh + +USER mfi + +HEALTHCHECK --start-period=3m CMD wget -q -O /dev/null --no-check-certificate \ + https://127.0.0.1:6443/login -- Gitblit v1.9.1