Skip to content

Commit

Permalink
Move installation of git below everything
Browse files Browse the repository at this point in the history
  • Loading branch information
waseem-h committed Oct 19, 2019
1 parent 577e633 commit fcbfd33
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,12 @@ ENV DOCKER_API_VERSION=1.32
# Install utilities from yum
RUN echo "===> Installing Utilities from yum ..." && \
yum install -y epel-release && \
yum install -y sudo wget openssh groff less python python-pip jq unzip gcc-c++ make openssl \
yum install -y sudo git wget openssh groff less python python-pip jq unzip gcc-c++ make openssl \
sshpass openssh-clients rsync gnupg gettext which java-1.8.0-openjdk-1.8.0.191.b12 && \
\
echo "===> Cleaning YUM cache..." && \
yum clean all

RUN yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel && \
yum install -y gcc perl-ExtUtils-MakeMaker && \
mkdir -p /usr/src && \
cd /usr/src && \
wget https://www.kernel.org/pub/software/scm/git/git-2.21.0.tar.gz && \
tar xzf git-2.21.0.tar.gz && \
cd git-2.21.0 && \
make prefix=/usr/local/git all && \
echo "export PATH=/usr/local/git/bin:$PATH" >> /etc/bashrc && \
source /etc/bashrc && \
mv git /usr/bin/ && \
rm -rf /usr/src

RUN echo "===> Installing Tools via pip ..." && \
pip install --upgrade pip cffi && \
pip install --upgrade ansible boto3 awscli git+https://github.com/makethunder/awsudo.git pywinrm && \
Expand Down Expand Up @@ -182,6 +169,21 @@ ARG ECR_CREDENTIALS_HELPER_URL=https://amazon-ecr-credential-helper-releases.s3.
RUN wget ${ECR_CREDENTIALS_HELPER_URL} \
&& mv docker-credential-ecr-login /usr/bin \
&& chmod +x /usr/bin/docker-credential-ecr-login

RUN yum remove -y git && \
yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel && \
yum install -y gcc perl-ExtUtils-MakeMaker && \
mkdir -p /usr/src && \
cd /usr/src && \
wget https://www.kernel.org/pub/software/scm/git/git-2.21.0.tar.gz && \
tar xzf git-2.21.0.tar.gz && \
cd git-2.21.0 && \
make prefix=/usr/local/git all && \
echo "export PATH=/usr/local/git/bin:$PATH" >> /etc/bashrc && \
source /etc/bashrc && \
mv git /usr/bin/ && \
rm -rf /usr/src

ADD bootstrap.sh /
ADD binaries/* /usr/local/bin/
ENTRYPOINT ["/bootstrap.sh"]

0 comments on commit fcbfd33

Please sign in to comment.