forked from jacksoncage/salt-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile-centos6
35 lines (27 loc) · 1.15 KB
/
Dockerfile-centos6
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
FROM centos:6
MAINTAINER Viktor Hansson "viktor.hansson@dataductus.se"
# Workaround to remove annoying logs about ipv6
RUN sed --in-place '/HOSTNAME/d' /etc/sysconfig/network && \
mkdir /etc/sysctl.d && \
echo "net.ipv6.conf.default.disable_ipv6=1" > /etc/sysctl.d/ipv6.conf && \
echo "net.ipv6.conf.all.disable_ipv6=1" >> /etc/sysctl.d/ipv6.conf
# Install the Saltstack 2016.11 minion
# Must use gitpython version lower than 2.0.9 when using python 2.6, see
# https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#id3
RUN yum install -y https://repo.saltstack.com/yum/redhat/salt-repo-2016.11-2.el6.noarch.rpm curl && \
yum install epel-release -y && \
yum clean expire-cache && \
yum install -y salt-master salt-minion salt-api python-pip sudo git && \
yum clean all && \
pip install 'GitPython<2.0.9'
# Required to run docker inside docker, since AUFS inside AUFS is not possible
VOLUME [ "/var/lib/docker" ]
# Add salt config files
ADD etc/master /etc/salt/master_template
ADD etc/minion /etc/salt/minion_template
# Exposing salt master ports
EXPOSE 4505 4506
STOPSIGNAL 37
# Add and set start script
ADD start.sh /start.sh
CMD ["bash", "start.sh"]