Move entrypoint to /usr/local/bin (#104)

* Move entrypoint to /usr/local/bin

 - so that it's not served by the webserver
This commit is contained in:
Markus Opolka
2021-11-25 07:56:11 +01:00
committed by GitHub
parent 19a1a0d044
commit 19a387488a
8 changed files with 14 additions and 14 deletions

View File

@@ -75,8 +75,8 @@ RUN set -ex; \
chown -R www-data:www-data /var/www/html /etc/apache2 chown -R www-data:www-data /var/www/html /etc/apache2
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY vhosts-access-log.conf /etc/apache2/conf-enabled/other-vhosts-access-log.conf COPY vhosts-access-log.conf /etc/apache2/conf-enabled/other-vhosts-access-log.conf
USER $USER USER $USER
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["apache2-foreground"] CMD ["apache2-foreground"]

View File

@@ -52,6 +52,6 @@ RUN set -ex; \
EXPOSE 9000 EXPOSE 9000
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["php-fpm"] CMD ["php-fpm"]

View File

@@ -62,6 +62,6 @@ RUN set -ex; \
EXPOSE 9000 EXPOSE 9000
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["php-fpm"] CMD ["php-fpm"]

View File

@@ -78,8 +78,8 @@ RUN set -ex; \
EXPOSE $LISTEN_PORT EXPOSE $LISTEN_PORT
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY vhosts-access-log.conf /etc/apache2/conf-enabled/other-vhosts-access-log.conf COPY vhosts-access-log.conf /etc/apache2/conf-enabled/other-vhosts-access-log.conf
USER $USER USER $USER
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["apache2-foreground"] CMD ["apache2-foreground"]

View File

@@ -54,7 +54,7 @@ RUN set -ex; \
EXPOSE 9000 EXPOSE 9000
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
USER $USER USER $USER
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["php-fpm"] CMD ["php-fpm"]

View File

@@ -63,7 +63,7 @@ RUN set -ex; \
EXPOSE 9000 EXPOSE 9000
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
USER $USER USER $USER
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["php-fpm"] CMD ["php-fpm"]

View File

@@ -9,7 +9,7 @@ fileContentTests:
path: '/var/www/html/admin/index.php' path: '/var/www/html/admin/index.php'
expectedContents: ['LimeSurvey'] expectedContents: ['LimeSurvey']
- name: 'Entrypoint file content' - name: 'Entrypoint file content'
path: '/var/www/html/entrypoint.sh' path: '/usr/local/bin/entrypoint.sh'
expectedContents: ['console.php', 'ADMIN_USER'] expectedContents: ['console.php', 'ADMIN_USER']
fileExistenceTests: fileExistenceTests:

View File

@@ -9,7 +9,7 @@ fileContentTests:
path: '/var/www/html/admin/index.php' path: '/var/www/html/admin/index.php'
expectedContents: ['LimeSurvey'] expectedContents: ['LimeSurvey']
- name: 'Entrypoint file content' - name: 'Entrypoint file content'
path: '/var/www/html/entrypoint.sh' path: '/usr/local/bin/entrypoint.sh'
expectedContents: ['console.php', 'ADMIN_USER'] expectedContents: ['console.php', 'ADMIN_USER']
fileExistenceTests: fileExistenceTests: