Skip to content

Commit 0f6f3a3

Browse files
ref(Dockerfile): install git from PPA (#395)
1 parent a849301 commit 0f6f3a3

1 file changed

Lines changed: 6 additions & 24 deletions

File tree

rootfs/Dockerfile

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ RUN adduser --system \
77
--group \
88
git
99

10-
RUN apt-get update \
10+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E1DF1F24 \
11+
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu xenial main" >> /etc/apt/sources.list \
12+
&& apt-get update \
1113
&& apt-get install -y \
14+
git \
1215
sudo \
1316
openssh-server \
1417
coreutils \
@@ -19,29 +22,8 @@ RUN apt-get update \
1922
&& rm -rf /etc/ssh/ssh_host* \
2023
&& mkdir /apps \
2124
&& apt-get clean \
22-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc
23-
24-
# install git from source
25-
ENV GIT_VERSION 2.8.4
26-
RUN apt-get update \
27-
&& apt-get install -y \
28-
build-essential \
29-
gettext \
30-
libcurl4-gnutls-dev \
31-
libexpat1-dev \
32-
libssl-dev \
33-
libz-dev \
34-
--no-install-recommends \
35-
&& curl -SsL https://github.com/git/git/archive/v$GIT_VERSION.tar.gz --output git.tar.gz \
36-
&& tar -xzf git.tar.gz \
37-
&& cd git-$GIT_VERSION \
38-
&& make prefix=/usr/local all \
39-
&& make prefix=/usr/local install \
40-
&& cd .. \
41-
&& rm -rf git-$GIT_VERSION git.tar.gz \
42-
&& passwd -u git \
43-
&& apt-get clean \
44-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc
25+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc \
26+
&& passwd -u git
4527

4628
COPY . /
4729

0 commit comments

Comments
 (0)