diff --git a/Makefile b/Makefile index d12d1e593..6c6aef341 100644 --- a/Makefile +++ b/Makefile @@ -259,4 +259,13 @@ bundle-atlassian: cd `pwd`/linux/ecosystem/atlassian/crucible/latest && pwd && make cd `pwd`/linux/ecosystem/atlassian/fisheye/latest && pwd && make cd `pwd`/linux/ecosystem/atlassian/fisheye-crucible/latest && pwd && make - cd `pwd`/linux/ecosystem/atlassian/jira/latest && pwd && make \ No newline at end of file + cd `pwd`/linux/ecosystem/atlassian/jira/latest && pwd && make + +bundle-web: + @echo "=======================================" + @echo "===== Building web images =====" + @echo "=======================================" + make ecosystem-php-images + make ecosystem-apache2-images + make ecosystem-nginx-images + \ No newline at end of file diff --git a/linux/ecosystem/apache2/latest/Dockerfile b/linux/ecosystem/apache2/latest/Dockerfile index db8a92b9e..1a4b54ac3 100644 --- a/linux/ecosystem/apache2/latest/Dockerfile +++ b/linux/ecosystem/apache2/latest/Dockerfile @@ -99,14 +99,17 @@ RUN apt clean -y && \ rm -rfv /tmp/composer-setup.php && \ rm -rfv /tmp/ioncube.tar.gz -#volumes -VOLUME ["/var/www"] +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1 # Add image configuration and scripts -COPY run.sh /run.sh -RUN chmod 755 /*.sh +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh -# Configure application -EXPOSE 80 +#Final config +VOLUME ["/var/www"] WORKDIR /var/www/ -CMD ["/run.sh"] +EXPOSE 80 443 + +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] diff --git a/linux/ecosystem/apache2/latest/run.sh b/linux/ecosystem/apache2/latest/docker-entrypoint.sh similarity index 100% rename from linux/ecosystem/apache2/latest/run.sh rename to linux/ecosystem/apache2/latest/docker-entrypoint.sh diff --git a/linux/ecosystem/apache2/php7.2/Dockerfile b/linux/ecosystem/apache2/php7.2/Dockerfile index ae31ddbc1..b972a8e42 100644 --- a/linux/ecosystem/apache2/php7.2/Dockerfile +++ b/linux/ecosystem/apache2/php7.2/Dockerfile @@ -92,14 +92,17 @@ RUN apt clean -y && \ rm -rfv /tmp/composer-setup.php && \ rm -rfv /tmp/ioncube.tar.gz -#volumes -VOLUME ["/var/www"] +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1 # Add image configuration and scripts -COPY run.sh /run.sh -RUN chmod 755 /*.sh +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh -# Configure application -EXPOSE 80 +#Final config +VOLUME ["/var/www"] WORKDIR /var/www/ -CMD ["/run.sh"] +EXPOSE 80 443 + +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] diff --git a/linux/ecosystem/apache2/php7.2/run.sh b/linux/ecosystem/apache2/php7.2/docker-entrypoint.sh similarity index 100% rename from linux/ecosystem/apache2/php7.2/run.sh rename to linux/ecosystem/apache2/php7.2/docker-entrypoint.sh diff --git a/linux/ecosystem/apache2/php7.3/Dockerfile b/linux/ecosystem/apache2/php7.3/Dockerfile index 7848e964a..8c97f96f5 100644 --- a/linux/ecosystem/apache2/php7.3/Dockerfile +++ b/linux/ecosystem/apache2/php7.3/Dockerfile @@ -92,14 +92,17 @@ RUN apt clean -y && \ rm -rfv /tmp/composer-setup.php && \ rm -rfv /tmp/ioncube.tar.gz -#volumes -VOLUME ["/var/www"] +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1 # Add image configuration and scripts -COPY run.sh /run.sh -RUN chmod 755 /*.sh +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh -# Configure application -EXPOSE 80 +#Final config +VOLUME ["/var/www"] WORKDIR /var/www/ -CMD ["/run.sh"] +EXPOSE 80 443 + +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] diff --git a/linux/ecosystem/apache2/php7.3/run.sh b/linux/ecosystem/apache2/php7.3/docker-entrypoint.sh similarity index 100% rename from linux/ecosystem/apache2/php7.3/run.sh rename to linux/ecosystem/apache2/php7.3/docker-entrypoint.sh diff --git a/linux/ecosystem/apache2/php7.4/Dockerfile b/linux/ecosystem/apache2/php7.4/Dockerfile index db8a92b9e..1a4b54ac3 100644 --- a/linux/ecosystem/apache2/php7.4/Dockerfile +++ b/linux/ecosystem/apache2/php7.4/Dockerfile @@ -99,14 +99,17 @@ RUN apt clean -y && \ rm -rfv /tmp/composer-setup.php && \ rm -rfv /tmp/ioncube.tar.gz -#volumes -VOLUME ["/var/www"] +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1 # Add image configuration and scripts -COPY run.sh /run.sh -RUN chmod 755 /*.sh +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh -# Configure application -EXPOSE 80 +#Final config +VOLUME ["/var/www"] WORKDIR /var/www/ -CMD ["/run.sh"] +EXPOSE 80 443 + +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] diff --git a/linux/ecosystem/apache2/php7.4/run.sh b/linux/ecosystem/apache2/php7.4/docker-entrypoint.sh similarity index 100% rename from linux/ecosystem/apache2/php7.4/run.sh rename to linux/ecosystem/apache2/php7.4/docker-entrypoint.sh diff --git a/linux/ecosystem/apache2/php8.0/Dockerfile b/linux/ecosystem/apache2/php8.0/Dockerfile index 10ea14baa..ec62bb1fb 100644 --- a/linux/ecosystem/apache2/php8.0/Dockerfile +++ b/linux/ecosystem/apache2/php8.0/Dockerfile @@ -100,14 +100,17 @@ RUN apt clean -y && \ rm -rfv /tmp/composer-setup.php && \ rm -rfv /tmp/ioncube.tar.gz -#volumes -VOLUME ["/var/www"] +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1 # Add image configuration and scripts -COPY run.sh /run.sh -RUN chmod 755 /*.sh +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh -# Configure application -EXPOSE 80 +#Final config +VOLUME ["/var/www"] WORKDIR /var/www/ -CMD ["/run.sh"] +EXPOSE 80 443 + +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] diff --git a/linux/ecosystem/apache2/php8.0/run.sh b/linux/ecosystem/apache2/php8.0/docker-entrypoint.sh similarity index 100% rename from linux/ecosystem/apache2/php8.0/run.sh rename to linux/ecosystem/apache2/php8.0/docker-entrypoint.sh diff --git a/linux/ecosystem/nginx/latest/main/Dockerfile b/linux/ecosystem/nginx/latest/main/Dockerfile index 040057cfc..013b2758c 100644 --- a/linux/ecosystem/nginx/latest/main/Dockerfile +++ b/linux/ecosystem/nginx/latest/main/Dockerfile @@ -239,8 +239,16 @@ RUN apt-get update && \ rm -rf /builds/* && \ rm -rf /valve/* +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1 + +# Add image configuration and scripts +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh + #Final config VOLUME ["/var/cache/nginx"] EXPOSE 80 443 -CMD ["nginx", "-g", "daemon off;"] +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] diff --git a/linux/ecosystem/nginx/latest/main/docker-entrypoint.sh b/linux/ecosystem/nginx/latest/main/docker-entrypoint.sh new file mode 100755 index 000000000..9ebcd6a91 --- /dev/null +++ b/linux/ecosystem/nginx/latest/main/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [[ -z "${FIX_WWW_DATA}" ]]; then + echo "[nginx] env FIX_WWW_DATA is not set. Skipping..." +elif [ "${FIX_WWW_DATA}" == "false" ]; then + echo "[nginx] env FIX_WWW_DATA is set to false. Skipping..." +elif [ "${FIX_WWW_DATA}" == "true" ]; then + echo "[nginx] Changing permissions for /var/www path. Dont worry, please wait." + chown www-data:www-data /var/www -R + echo "[nginx] Done" +else + echo "[nginx] env FIX_WWW_DATA is set to strange value. Skipping..." +fi + +echo "[nginx] Starting up" +nginx -g 'daemon off;' diff --git a/linux/ecosystem/nginx/latest/php/Dockerfile b/linux/ecosystem/nginx/latest/php/Dockerfile index 3b2664f17..df6c10846 100644 --- a/linux/ecosystem/nginx/latest/php/Dockerfile +++ b/linux/ecosystem/nginx/latest/php/Dockerfile @@ -250,8 +250,16 @@ RUN apt clean -y && \ rm -rfv /tmp/composer-setup.php && \ rm -rfv /tmp/ioncube.tar.gz +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1 + +# Add image configuration and scripts +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh + #Final config VOLUME ["/var/cache/nginx"] EXPOSE 80 443 -CMD ["nginx", "-g", "daemon off;"] +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] \ No newline at end of file diff --git a/linux/ecosystem/nginx/latest/php/docker-entrypoint.sh b/linux/ecosystem/nginx/latest/php/docker-entrypoint.sh new file mode 100755 index 000000000..9ebcd6a91 --- /dev/null +++ b/linux/ecosystem/nginx/latest/php/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [[ -z "${FIX_WWW_DATA}" ]]; then + echo "[nginx] env FIX_WWW_DATA is not set. Skipping..." +elif [ "${FIX_WWW_DATA}" == "false" ]; then + echo "[nginx] env FIX_WWW_DATA is set to false. Skipping..." +elif [ "${FIX_WWW_DATA}" == "true" ]; then + echo "[nginx] Changing permissions for /var/www path. Dont worry, please wait." + chown www-data:www-data /var/www -R + echo "[nginx] Done" +else + echo "[nginx] env FIX_WWW_DATA is set to strange value. Skipping..." +fi + +echo "[nginx] Starting up" +nginx -g 'daemon off;' diff --git a/linux/ecosystem/nginx/latest/quic/docker-entrypoint.sh b/linux/ecosystem/nginx/latest/quic/docker-entrypoint.sh new file mode 100755 index 000000000..9ebcd6a91 --- /dev/null +++ b/linux/ecosystem/nginx/latest/quic/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [[ -z "${FIX_WWW_DATA}" ]]; then + echo "[nginx] env FIX_WWW_DATA is not set. Skipping..." +elif [ "${FIX_WWW_DATA}" == "false" ]; then + echo "[nginx] env FIX_WWW_DATA is set to false. Skipping..." +elif [ "${FIX_WWW_DATA}" == "true" ]; then + echo "[nginx] Changing permissions for /var/www path. Dont worry, please wait." + chown www-data:www-data /var/www -R + echo "[nginx] Done" +else + echo "[nginx] env FIX_WWW_DATA is set to strange value. Skipping..." +fi + +echo "[nginx] Starting up" +nginx -g 'daemon off;' diff --git a/linux/ecosystem/nginx/latest/rtmp-hls/Dockerfile b/linux/ecosystem/nginx/latest/rtmp-hls/Dockerfile index d7d9b5901..80f85590f 100644 --- a/linux/ecosystem/nginx/latest/rtmp-hls/Dockerfile +++ b/linux/ecosystem/nginx/latest/rtmp-hls/Dockerfile @@ -38,7 +38,6 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio libx264-dev \ libx265-dev - ################################################################## # stretch sources list + libvpx ################################################################## @@ -49,7 +48,6 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio apt-get install -y --allow-unauthenticated \ libvpx4 - ################################################################## # buster sources list + libvpx ################################################################## @@ -60,7 +58,6 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio apt-get install -y --allow-unauthenticated \ libvpx5 - ################################################################## # sid sources list + libvpx ################################################################## @@ -71,7 +68,6 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio apt-get install -y --allow-unauthenticated \ libvpx6 - ################################################################## # installing deps for rtmp module ################################################################## @@ -120,8 +116,16 @@ RUN apt clean -y && \ rm -rfv /var/lib/apt/lists/* && \ rm -rfv /var/cache/apt/archives/*.deb +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1 -EXPOSE 1935 -EXPOSE 8080 +# Add image configuration and scripts +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh -CMD ["nginx", "-g", "daemon off;"] +#Final config +VOLUME ["/var/cache/nginx"] +EXPOSE 80 443 1935 8080 + +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] diff --git a/linux/ecosystem/nginx/latest/rtmp-hls/docker-entrypoint.sh b/linux/ecosystem/nginx/latest/rtmp-hls/docker-entrypoint.sh new file mode 100755 index 000000000..9ebcd6a91 --- /dev/null +++ b/linux/ecosystem/nginx/latest/rtmp-hls/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [[ -z "${FIX_WWW_DATA}" ]]; then + echo "[nginx] env FIX_WWW_DATA is not set. Skipping..." +elif [ "${FIX_WWW_DATA}" == "false" ]; then + echo "[nginx] env FIX_WWW_DATA is set to false. Skipping..." +elif [ "${FIX_WWW_DATA}" == "true" ]; then + echo "[nginx] Changing permissions for /var/www path. Dont worry, please wait." + chown www-data:www-data /var/www -R + echo "[nginx] Done" +else + echo "[nginx] env FIX_WWW_DATA is set to strange value. Skipping..." +fi + +echo "[nginx] Starting up" +nginx -g 'daemon off;' diff --git a/linux/ecosystem/testrail/ad/Dockerfile b/linux/ecosystem/testrail/ad/Dockerfile index 2d15f799a..589c7469d 100644 --- a/linux/ecosystem/testrail/ad/Dockerfile +++ b/linux/ecosystem/testrail/ad/Dockerfile @@ -7,7 +7,7 @@ ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE} ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE} -RUN rm -rfv /run.sh -COPY run.sh /run.sh +RUN rm -rfv /usr/bin/docker-entrypoint.sh +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL} diff --git a/linux/ecosystem/testrail/ad/run.sh b/linux/ecosystem/testrail/ad/docker-entrypoint.sh similarity index 100% rename from linux/ecosystem/testrail/ad/run.sh rename to linux/ecosystem/testrail/ad/docker-entrypoint.sh diff --git a/linux/ecosystem/testrail/latest/Dockerfile b/linux/ecosystem/testrail/latest/Dockerfile index e48abbff0..dbe6f62ee 100644 --- a/linux/ecosystem/testrail/latest/Dockerfile +++ b/linux/ecosystem/testrail/latest/Dockerfile @@ -46,11 +46,18 @@ RUN \ chown -R www-data:www-data ${TR_OPT_PATH} && \ ls -las ${TR_OPT_PATH} - COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf -COPY run.sh /run.sh +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1 + +# Add image configuration and scripts +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh + +#Final config WORKDIR /var/www/testrail -EXPOSE 80 +EXPOSE 80 443 -CMD ["/run.sh"] +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] diff --git a/linux/ecosystem/testrail/latest/run.sh b/linux/ecosystem/testrail/latest/docker-entrypoint.sh similarity index 100% rename from linux/ecosystem/testrail/latest/run.sh rename to linux/ecosystem/testrail/latest/docker-entrypoint.sh diff --git a/linux/ecosystem/testrail/ldap/Dockerfile b/linux/ecosystem/testrail/ldap/Dockerfile index 543fc5aab..62fb14b9f 100644 --- a/linux/ecosystem/testrail/ldap/Dockerfile +++ b/linux/ecosystem/testrail/ldap/Dockerfile @@ -7,7 +7,7 @@ ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE} ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE} -RUN rm -rfv /run.sh -COPY run.sh /run.sh +RUN rm -rfv /usr/bin/docker-entrypoint.sh +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL} diff --git a/linux/ecosystem/testrail/ldap/run.sh b/linux/ecosystem/testrail/ldap/docker-entrypoint.sh similarity index 100% rename from linux/ecosystem/testrail/ldap/run.sh rename to linux/ecosystem/testrail/ldap/docker-entrypoint.sh diff --git a/linux/ecosystem/torrserver/Dockerfile b/linux/ecosystem/torrserver/Dockerfile index eeb9b9538..6c0e398aa 100644 --- a/linux/ecosystem/torrserver/Dockerfile +++ b/linux/ecosystem/torrserver/Dockerfile @@ -24,4 +24,7 @@ EXPOSE \ VOLUME \ /config +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:${UI_PORT}/ || exit 1 + ENTRYPOINT /opt/torrServer --port $UI_PORT -path /config \ No newline at end of file