mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-09 06:40:03 -07:00
Add httptester docker container files and update run_tests.sh to use ansible/httptester
This commit is contained in:
parent
6a0a366746
commit
164f247ec8
4 changed files with 86 additions and 2 deletions
28
test/utils/docker/httptester/Dockerfile
Normal file
28
test/utils/docker/httptester/Dockerfile
Normal file
|
@ -0,0 +1,28 @@
|
|||
FROM nginx:alpine
|
||||
|
||||
RUN set -x && \
|
||||
apk add -U openssl py-pip && \
|
||||
mkdir -p /root/ca/certs /root/ca/private /root/ca/newcerts && \
|
||||
echo 1000 > /root/ca/serial && \
|
||||
touch /root/ca/index.txt && \
|
||||
sed -i 's/\.\/demoCA/\/root\/ca/g' /etc/ssl/openssl.cnf && \
|
||||
openssl req -new -x509 -days 3650 -nodes -extensions v3_ca -keyout /root/ca/private/cakey.pem -out /root/ca/cacert.pem \
|
||||
-subj "/C=US/ST=North Carolina/L=Durham/O=Ansible/CN=ansible.http.tests" && \
|
||||
openssl req -new -nodes -out /root/ca/ansible.http.tests-req.pem -keyout /root/ca/private/ansible.http.tests-key.pem \
|
||||
-subj "/C=US/ST=North Carolina/L=Durham/O=Ansible/CN=ansible.http.tests" && \
|
||||
yes | openssl ca -config /etc/ssl/openssl.cnf -out /root/ca/ansible.http.tests-cert.pem -infiles /root/ca/ansible.http.tests-req.pem && \
|
||||
openssl req -new -nodes -out /root/ca/sni1.ansible.http.tests-req.pem -keyout /root/ca/private/sni1.ansible.http.tests-key.pem -config /etc/ssl/openssl.cnf \
|
||||
-subj "/C=US/ST=North Carolina/L=Durham/O=Ansible/CN=sni1.ansible.http.tests" && \
|
||||
yes | openssl ca -config /etc/ssl/openssl.cnf -out /root/ca/sni1.ansible.http.tests-cert.pem -infiles /root/ca/sni1.ansible.http.tests-req.pem && \
|
||||
openssl req -new -nodes -out /root/ca/sni2.ansible.http.tests-req.pem -keyout /root/ca/private/sni2.ansible.http.tests-key.pem -config /etc/ssl/openssl.cnf \
|
||||
-subj "/C=US/ST=North Carolina/L=Durham/O=Ansible/CN=sni2.ansible.http.tests" && \
|
||||
yes | openssl ca -config /etc/ssl/openssl.cnf -out /root/ca/sni2.ansible.http.tests-cert.pem -infiles /root/ca/sni2.ansible.http.tests-req.pem && \
|
||||
cp /root/ca/cacert.pem /usr/share/nginx/html/cacert.pem && \
|
||||
pip install gunicorn httpbin
|
||||
|
||||
ADD services.sh /services.sh
|
||||
ADD nginx.sites.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
CMD ["/services.sh"]
|
Loading…
Add table
Add a link
Reference in a new issue