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 | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 145b47b..3c3d67f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,13 @@ -FROM java:jre +FROM openjdk:jre MAINTAINER Jacek Kowalski <Jacek@jacekk.info> -ENV GITBLIT_VERSION 1.7.1 +ENV GITBLIT_VERSION 1.8.0 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