From f38cfbd0cd5ebfd78fec67adc6490699f62d8b2f Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Sun, 26 Nov 2017 13:19:54 +0000 Subject: [PATCH] Remove APT lists from image to lower its size --- Dockerfile | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c57fff4..3c3d67f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM java:jre +FROM openjdk:jre MAINTAINER Jacek Kowalski <Jacek@jacekk.info> ENV GITBLIT_VERSION 1.8.0 @@ -6,7 +6,8 @@ RUN apt-get update \ && apt-get dist-upgrade -y \ && apt-get install -y git-core sudo wget \ - && apt-get clean + && apt-get clean \ + && rm -Rf /var/lib/apt/lists/* # Install Gitblit @@ -16,8 +17,8 @@ && rm -f /tmp/gitblit.tar.gz \ && ln -s gitblit-${GITBLIT_VERSION} gitblit \ && mv gitblit/data gitblit-data-initial \ - && mkdir gitblit-data -RUN groupadd -r -g 500 gitblit \ + && mkdir gitblit-data \ + && groupadd -r -g 500 gitblit \ && useradd -r -d /opt/gitblit-data -u 500 -g 500 gitblit \ && chown -Rf gitblit:gitblit /opt/gitblit-* -- Gitblit v1.9.1