forked from ansible/ansible-runner-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (34 loc) · 1.47 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
FROM centos:7
# Install dependencies
RUN yum -y install epel-release && \
yum -y install bash wget unzip \
pexpect python-daemon bubblewrap gcc \
bzip2 openssh openssh-clients python2-psutil\
python36 python36-devel python36-setuptools\
nginx supervisor && \
localedef -c -i en_US -f UTF-8 en_US.UTF-8
RUN /usr/bin/python3 -m pip install ansible cryptography docutils psutil PyYAML \
pyOpenSSL flask flask-restful uwsgi netaddr notario && \
/usr/bin/python3 -m pip install --no-cache-dir ansible-runner==1.4.6 && \
rm -rf /var/cache/yum
# Prepare folders for shared access and ssh
RUN mkdir -p /etc/ansible-runner-service && \
mkdir -p /root/.ssh && \
mkdir -p /usr/share/ansible-runner-service/{artifacts,env,project,inventory,client_cert}
# Install Ansible Runner
WORKDIR /root
COPY ./*.py ansible-runner-service/
COPY ./*.yaml ansible-runner-service/
COPY ./runner_service ansible-runner-service/runner_service
COPY ./samples ansible-runner-service/samples
# Put configuration files in the right places
# Nginx configuration
COPY misc/nginx/nginx.conf /etc/nginx/
# Ansible Runner Service nginx virtual server
COPY misc/nginx/ars_site_nginx.conf /etc/nginx/conf.d
# Ansible Runner Service uwsgi settings
COPY misc/nginx/uwsgi.ini /root/ansible-runner-service
# Supervisor start sequence
COPY misc/nginx/supervisord.conf /root/ansible-runner-service
# Start services
CMD ["/usr/bin/supervisord", "-c", "/root/ansible-runner-service/supervisord.conf"]