-
Notifications
You must be signed in to change notification settings - Fork 30
/
Dockerfile-centos-7
45 lines (37 loc) · 1.36 KB
/
Dockerfile-centos-7
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
39
40
41
42
43
44
45
FROM centos/systemd
ARG FPM_VERSION=1.11.0
ARG PYTHON_VERSION=3
ARG DOCKER_WORKDIR=/usr/share/pdagent
ARG SKIP_SYSTEMD=false
ENV PYTHON_VERSION ${PYTHON_VERSION}
ENV container docker
ENV DOCKER_WORKDIR ${DOCKER_WORKDIR}
# There is known issues with Docker + systemd
ENV SKIP_SYSTEMD ${SKIP_SYSTEMD}
RUN yum install -y -q centos-release-scl
RUN yum install -y -q createrepo
RUN yum install -y -q gcc
RUN yum install -y -q gcc-c++
RUN yum install -y -q kernel-devel
RUN yum install -y -q make
RUN yum install -y -q python27-python-pip
RUN yum install -y -q python3-pip
RUN yum install -y -q rpm-build
RUN yum install -y -q rpm-sign
RUN yum install -y -q rh-ruby23
RUN yum install -y -q rh-ruby23-ruby-devel
RUN yum install -y -q sudo
RUN yum install -y -q which
RUN yum install -y -q initscripts
# Lock dotenv version to prevent ruby 3.0 requirement
RUN source /opt/rh/rh-ruby23/enable && \
/opt/rh/rh-ruby23/root/usr/bin/gem install -q --no-ri --no-rdoc -v 2.8.1 dotenv
# Lock ffi version to prevent ruby 2.5 requirement
RUN source /opt/rh/rh-ruby23/enable && \
/opt/rh/rh-ruby23/root/usr/bin/gem install -q --no-ri --no-rdoc -v 1.15.5 ffi
RUN source /opt/rh/rh-ruby23/enable && \
/opt/rh/rh-ruby23/root/usr/bin/gem install -q --no-ri --no-rdoc -v $FPM_VERSION fpm
RUN yum install -y python${PYTHON_VERSION}
COPY . $DOCKER_WORKDIR
WORKDIR $DOCKER_WORKDIR
CMD ["/usr/sbin/init"]