blob: 43b6e9d2c861b04de4f0e71030ec9b129b6514e4 (
plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
FROM centos:7
ARG UID=0
# Add ansible-devel so that we get collections!
ADD tools/docker-compose/ansible_nightly.repo /etc/yum.repos.d/ansible_nightly.repo
RUN yum -y update && yum -y install epel-release && yum -y install https://centos7.iuscommunity.org/ius-release.rpm
# sync with installer/roles/image_build/templates/Dockerfile.j2
RUN yum -y install acl \
alsa-lib \
ansible \
atk \
bubblewrap \
cups-libs \
curl \
cyrus-sasl \
cyrus-sasl-devel \
gcc \
gcc-c++ \
GConf2 \
git2u \
git2u-core \
gtk3 \
ipa-gothic-fonts \
krb5-devel \
krb5-libs \
krb5-workstation \
libcurl-devel \
libffi-devel \
libselinux-python \
libstdc++.so.6 \
libtool-ltdl-devel \
libXcomposite \
libXcursor \
libXdamage \
libXext \
libXi \
libxml2-devel \
libXrandr \
libXScrnSaver \
libxslt-devel \
libXtst \
make \
mercurial \
mg \
nginx \
nodejs \
openldap-devel \
openssh-server \
patch \
postgresql-contrib \
postgresql-devel \
python-devel \
python-pip \
python-psutil \
python-psycopg2 \
python-setuptools \
python36-devel \
python36-setuptools \
rsync \
setools-libs \
subversion \
sudo \
swig \
tmux \
unzip \
vim \
xmlsec1 \
xmlsec1-devel \
xmlsec1-openssl \
xmlsec1-openssl-devel \
xorg-x11-fonts-100dpi \
xorg-x11-fonts-75dpi \
xorg-x11-fonts-cyrillic \
xorg-x11-fonts-misc \
xorg-x11-fonts-Type1 \
xorg-x11-utils \
yum-utils
RUN yum install -y https://github.com/krallin/tini/releases/download/v0.18.0/tini_0.18.0.rpm
RUN /usr/bin/ssh-keygen -q -t rsa -N "" -f /root/.ssh/id_rsa
RUN mkdir -p /data/db
ADD tools/docker-compose/awx.egg-link /tmp/awx.egg-link
ADD tools/docker-compose/awx-manage /usr/local/bin/awx-manage
ADD tools/docker-compose/awx.egg-info /tmp/awx.egg-info
RUN openssl req -nodes -newkey rsa:2048 -keyout /etc/nginx/nginx.key -out /etc/nginx/nginx.csr -subj "/C=US/ST=North Carolina/L=Durham/O=Ansible/OU=AWX Development/CN=awx.localhost"
RUN openssl x509 -req -days 365 -in /etc/nginx/nginx.csr -signkey /etc/nginx/nginx.key -out /etc/nginx/nginx.crt
RUN python3 -m ensurepip && pip3 install virtualenv flake8
RUN pip install supervisor
ADD Makefile /tmp/Makefile
RUN mkdir /tmp/requirements
ADD requirements/requirements.txt \
requirements/requirements_git.txt \
requirements/requirements_ansible.txt \
requirements/requirements_ansible_git.txt \
requirements/requirements_dev.txt \
requirements/requirements_ansible_uninstall.txt \
requirements/requirements_tower_uninstall.txt \
/tmp/requirements/
RUN mkdir -p /venv && chmod g+w /venv
RUN cd /tmp && VENV_BASE="/venv" make requirements_dev
# Use the distro provided npm to bootstrap our required version of node
RUN npm install -g n
RUN n 10.15.0
# Install a newer SQLite to make Django happy (centos7 has a really old one,
# and we can probably stop doing this in centos8)
RUN curl -O "https://sqlite.org/2019/sqlite-autoconf-3290000.tar.gz"
RUN tar zxvf sqlite-autoconf-3290000.tar.gz
RUN cd sqlite-autoconf-3290000 && ./configure && make && make install
RUN mv -f /usr/local/lib/libsqlite3.so.0 /lib64/
RUN mv -f /usr/local/lib/libsqlite3.so.0.8.6 /lib64/
RUN yum -y remove cyrus-sasl-devel \
gcc \
gcc-c++ \
krb5-devel \
libtool-ltdl-devel \
libxml2-devel \
libxslt-devel \
openldap-devel \
postgresql-devel \
python-devel \
python36-devel \
nodejs \
xmlsec1-devel \
xmlsec1-openssl-devel
RUN yum -y clean all
RUN rm -rf /root/.cache
RUN localedef -c -i en_US -f UTF-8 en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ADD tools/docker-compose/nginx.conf /etc/nginx/nginx.conf
ADD tools/docker-compose/nginx.vh.default.conf /etc/nginx/conf.d/nginx.vh.default.conf
ADD tools/docker-compose/start_development.sh /start_development.sh
ADD tools/docker-compose/start_tests.sh /start_tests.sh
ADD tools/docker-compose/bootstrap_development.sh /bootstrap_development.sh
EXPOSE 8043 8013 8080 22
ADD tools/docker-compose/entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/bin/bash"]
# Pre-create things that we need to write to
RUN for dir in /var/lib/awx/ /var/log/tower/ /projects /.ansible /var/log/nginx /var/lib/nginx /.local; \
do mkdir -p $dir; chmod -R g+rwx $dir; chgrp -R root $dir; done
RUN for file in /etc/passwd /etc/supervisord.conf \
/venv/awx/lib/python3.6/site-packages/awx.egg-link /var/run/nginx.pid; \
do touch $file; chmod -R g+rwx $file; chgrp -R root $file; done
ENV HOME /var/lib/awx
ENV PATH=/usr/local/n/versions/node/10.15.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|