Skip to content

Commit d75b090

Browse files
author
Matthew Fisher
authored
Merge pull request #364 from bacongobbler/git-2-point-8
chore(Dockerfile): bump git to v2.8.4
2 parents d7f04fc + 27ba77e commit d75b090

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

rootfs/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Dockerfile

rootfs/Dockerfile

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ RUN adduser --system \
66
--home /home/git \
77
--group \
88
git
9-
9+
1010
COPY . /
1111

1212
RUN apt-get update \
1313
&& apt-get install -y \
1414
sudo \
15-
git \
1615
openssh-server \
1716
coreutils \
1817
tar \
@@ -21,6 +20,27 @@ RUN apt-get update \
2120
&& mkdir -p /var/run/sshd \
2221
&& rm -rf /etc/ssh/ssh_host* \
2322
&& mkdir /apps \
23+
&& apt-get clean \
24+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc
25+
26+
# install git from source
27+
ENV GIT_VERSION 2.8.4
28+
RUN apt-get update \
29+
&& apt-get install -y \
30+
build-essential \
31+
gettext \
32+
libcurl4-gnutls-dev \
33+
libexpat1-dev \
34+
libssl-dev \
35+
libz-dev \
36+
--no-install-recommends \
37+
&& curl -SsL https://github.com/git/git/archive/v$GIT_VERSION.tar.gz --output git.tar.gz \
38+
&& tar -xzf git.tar.gz \
39+
&& cd git-$GIT_VERSION \
40+
&& make prefix=/usr/local all \
41+
&& make prefix=/usr/local install \
42+
&& cd .. \
43+
&& rm -rf git-$GIT_VERSION git.tar.gz \
2444
&& passwd -u git \
2545
&& apt-get clean \
2646
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc

0 commit comments

Comments
 (0)