-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
82 lines (66 loc) · 2.18 KB
/
Dockerfile
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
FROM rundeckpro/enterprise:SNAPSHOT as rundeck
USER root
RUN echo "deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse /" | sudo tee -a /etc/apt/sources.list
RUN apt-get -y update && \
apt-get -y install \
software-properties-common \
apt-transport-https \
iputils-ping \
netcat-traditional \
sysstat \
vim \
build-essential \
openssh-server \
unzip \
zip \
jq \
nano \
sysstat
RUN apt-get install -y libffi-dev
RUN apt-get install libssl-dev openssl gcc make -y && \
cd /opt && \
wget https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz && \
tar xzvf Python-3.8.2.tgz && \
cd Python-3.8.2 && \
./configure --with-ensurepip=install && \
make && \
make install
ENV PATH="/opt/Python-3.8.2:$PATH"
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python get-pip.py
RUN apt-get install -y gcc python-dev libkrb5-dev krb5-user
## Install python winrm
RUN python -m pip install --upgrade pip && \
python -m pip install setuptools --force --upgrade && \
python -m pip install requests urllib3 pywinrm && \
python -m pip install pywinrm[credssp] && \
python -m pip install pywinrm[kerberos] && \
python -m pip install pexpect
RUN cpan JSON::MaybeXS
RUN cpan YAML
# install ansible
RUN apt-get -y install sshpass && \
apt-get -y install python3-pip && \
apt-get -y install python-pip && \
pip3 install --upgrade pip
RUN pip3 install ansible
RUN pip install docker-py
# install docker on container
RUN apt-get -y install docker.io
#set rundeck password
RUN echo 'rundeck:rundeck' | chpasswd
#RUN /etc/init.d/ssh status
USER rundeck
ENV RDECK_BASE=/home/rundeck \
ANSIBLE_CONFIG=/home/rundeck/ansible/ansible.cfg \
ANSIBLE_HOST_KEY_CHECKING=False\
USER=rundeck
ENV PATH="/opt/Python-3.8.2:$PATH"
#RUN mkdir data demo-projects
RUN mkdir data
COPY --chown=rundeck:root remco /etc/remco
COPY --chown=rundeck:root ./ansible ./ansible
COPY --chown=rundeck:root ./plugins ./libext
COPY --chown=rundeck:root ./data/linux_id_rsa /home/rundeck/ansible/id_rsa
RUN chmod 600 /home/rundeck/ansible/id_rsa
#COPY --chown=root:root config /etc/krb5.conf