|
37 | 37 | # 8 - Make the start script executable |
38 | 38 | # 9 - Clean the dnf/yum cache and other locations to reduce Docker Image layer size. |
39 | 39 | # Assume the base image has upgraded dnf and installed its dnf-plugins-core |
40 | | - RUN dnf install --assumeyes nginx && \ |
41 | | - # Push aside nginx default.conf files that may exist on the system |
42 | | - [ ! -f /etc/nginx/conf.d/default.conf ] || mv /etc/nginx/conf.d/default.conf /tmp/etc_nginx_conf.d_default.conf.ORIGINAL && \ |
43 | | - [ ! -f /etc/nginx/nginx.conf ] || mv /etc/nginx/nginx.conf /tmp/etc_nginx_nginx.conf.ORIGINAL && \ |
44 | | - # Install the nginx default.conf file just installed in WORKDIR |
45 | | - mv nginx/nginx.conf /etc/nginx/nginx.conf && \ |
46 | | - # Clean up the nginx install directory in WORKDIR |
47 | | - [ ! -d nginx ] || mv nginx /tmp/nginx_from_WORKDIR && \ |
48 | | - # Push aside the verification file from the base image which will |
49 | | - # no longer report correctly once uWSGI is started for the service. |
50 | | - [ ! -f /tmp/verify_uwsgi.sh ] || mv /tmp/verify_uwsgi.sh /tmp/verify_uwsgi.sh.ORIGINAL && \ |
51 | | - # Install the requirements.txt file for the service |
52 | | - pip3.13 install --no-cache-dir --upgrade pip -r src/requirements.txt && \ |
53 | | - # Make the script referenced in the CMD directive below executable. |
54 | | - chmod a+x start.sh && \ |
55 | | - # Clean up artifacts to slim down this layer of the Docker Image |
56 | | - dnf clean all && \ |
57 | | - rm -rf /var/cache/dnf \ |
58 | | - /var/log/dnf \ |
59 | | - /var/log/yum \ |
60 | | - /root/.cache |
| 40 | +RUN dnf install --assumeyes nginx && \ |
| 41 | + # Push aside nginx default.conf files that may exist on the system |
| 42 | + [ ! -f /etc/nginx/conf.d/default.conf ] || mv /etc/nginx/conf.d/default.conf /tmp/etc_nginx_conf.d_default.conf.ORIGINAL && \ |
| 43 | + [ ! -f /etc/nginx/nginx.conf ] || mv /etc/nginx/nginx.conf /tmp/etc_nginx_nginx.conf.ORIGINAL && \ |
| 44 | + # Install the nginx default.conf file just installed in WORKDIR |
| 45 | + mv nginx/nginx.conf /etc/nginx/nginx.conf && \ |
| 46 | + # Clean up the nginx install directory in WORKDIR |
| 47 | + [ ! -d nginx ] || mv nginx /tmp/nginx_from_WORKDIR && \ |
| 48 | + # Push aside the verification file from the base image which will |
| 49 | + # no longer report correctly once uWSGI is started for the service. |
| 50 | + [ ! -f /tmp/verify_uwsgi.sh ] || mv /tmp/verify_uwsgi.sh /tmp/verify_uwsgi.sh.ORIGINAL && \ |
| 51 | + # Install the requirements.txt file for the service |
| 52 | + pip3.13 install --no-cache-dir --upgrade pip -r src/requirements.txt && \ |
| 53 | + # Make the script referenced in the CMD directive below executable. |
| 54 | + chmod a+x start.sh && \ |
| 55 | + # Clean up artifacts to slim down this layer of the Docker Image |
| 56 | + dnf clean all && \ |
| 57 | + rm -rf /var/cache/dnf \ |
| 58 | + /var/log/dnf \ |
| 59 | + /var/log/yum \ |
| 60 | + /root/.cache |
61 | 61 |
|
62 | 62 | # The EXPOSE instruction informs Docker that the container listens on the specified network ports at runtime. |
63 | 63 | # EXPOSE does not make the ports of the container accessible to the host. |
|
0 commit comments