Razique Mahroua
2019-12-12 102742231595bc40946ecd69b5e7d8ab4a1ab898
Add the "hello world" nginx app
3 files added
1 files modified
30 ■■■■■ changed files
hello-world-nginx/Dockerfile 18 ●●●●● patch | view | raw | blame | history
hello-world-nginx/index.html 5 ●●●●● patch | view | raw | blame | history
hello-world-nginx/nginxconf.sed 5 ●●●●● patch | view | raw | blame | history
python-load/load.py 2 ●●● patch | view | raw | blame | history
hello-world-nginx/Dockerfile
New file
@@ -0,0 +1,18 @@
FROM registry.access.redhat.com/ubi8:8.0
RUN yum install -y --disableplugin=subscription-manager --nodocs nginx \
  && yum clean all
ADD index.html /usr/share/nginx/html
ADD nginxconf.sed /tmp/
RUN sed -i -f /tmp/nginxconf.sed /etc/nginx/nginx.conf
RUN touch /run/nginx.pid \
  && chgrp -R 0 /var/log/nginx /run/nginx.pid \
  && chmod -R g+rwx /var/log/nginx /run/nginx.pid
EXPOSE 8080
USER 1001
CMD nginx -g "daemon off;"
hello-world-nginx/index.html
New file
@@ -0,0 +1,5 @@
<html>
  <body>
    <h1>Hello, world from nginx!</h1>
  </body>
</html>
hello-world-nginx/nginxconf.sed
New file
@@ -0,0 +1,5 @@
s/listen       80/listen       8080/
s/listen       \[::\]:80/listen       \[::\]:8080/
s/user nginx;//
s%error_log /var/log/nginx/error.log%error_log stderr%
s%access_log  /var/log/nginx/access.log  main;%%
python-load/load.py
@@ -12,7 +12,7 @@
import signal
# Change the xrange (allocation) value accordingly.
allocation = 4096
allocation = 8192
stop_loop = 0
def exit_chld(x, y):