forked from Zimbra/zm-base-os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-devcore-centos-6
38 lines (32 loc) · 1.28 KB
/
Dockerfile-devcore-centos-6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# vi:ft=dockerfile
FROM centos:6
# SYSTEM
RUN yum clean all
RUN yum upgrade -y
RUN yum install -y curl wget which
RUN yum install -y sudo
# ENVIRONMENT
RUN yum install -y git perl ruby
RUN yum install -y perl-Data-Dumper perl-IPC-Cmd
RUN yum install -y gcc gcc-c++ make
RUN yum install -y java-1.8.0-openjdk-devel
RUN yum install -y rpm-build createrepo
# USERS
RUN useradd -ms /bin/bash -G wheel build
RUN sed -i -e 's/^#\s*\(%wheel.*NOPASSWD.*\)/\1/' /etc/sudoers
# Install missing java dependencies
RUN mkdir -p /home/build/.zm-dev-tools/
RUN wget "http://mirror.metrocast.net/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz" -O - | tar --no-same-owner -xzf - -C /home/build/.zm-dev-tools/
RUN wget "https://www.apache.org/dist/ant/binaries/apache-ant-1.9.13-bin.tar.gz" -O - | tar --no-same-owner -xzf - -C /home/build/.zm-dev-tools/
# Use a newer git
RUN yum install -y zlib-devel gettext
RUN wget "https://www.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz" -O - | tar --no-same-owner -xzf - -C /root
RUN cd /root/git-2.9.5 && ./configure --without-tcltk
RUN make -C /root/git-2.9.5
RUN make -C /root/git-2.9.5 install
RUN yum erase -y zlib-devel gettext
RUN yum erase -y git
RUN rm -rf /root/git-2.9.5
# REDUCE PRIVILEGE
USER build
WORKDIR /home/build