Skip to content

Commit

Permalink
Refs #121 Allow to overwrite CMD and have custom startup commands
Browse files Browse the repository at this point in the history
  • Loading branch information
cytopia committed Nov 8, 2019
1 parent bbe1b43 commit 2643b28
Show file tree
Hide file tree
Showing 51 changed files with 54 additions and 6 deletions.
1 change: 1 addition & 0 deletions Dockerfiles/base/Dockerfile-5.2
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/base/Dockerfile-5.3
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/base/Dockerfile-5.4
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/base/Dockerfile-5.5
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/base/Dockerfile-5.6
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/base/Dockerfile-7.0
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/base/Dockerfile-7.1
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/base/Dockerfile-7.2
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/base/Dockerfile-7.3
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/base/Dockerfile-7.4
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/base/Dockerfile-8.0
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
4 changes: 2 additions & 2 deletions Dockerfiles/base/data/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e
set -u
set -p pipefail
set -o pipefail


###
Expand Down Expand Up @@ -52,4 +52,4 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
### Startup
###
log "info" "Starting $( php-fpm -v 2>&1 | head -1 )" "${DEBUG_LEVEL}"
exec /usr/local/sbin/php-fpm
exec "${@}"
1 change: 1 addition & 0 deletions Dockerfiles/mods/Dockerfile-5.2
Original file line number Diff line number Diff line change
Expand Up @@ -773,4 +773,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/mods/Dockerfile-5.3
Original file line number Diff line number Diff line change
Expand Up @@ -916,4 +916,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/mods/Dockerfile-5.4
Original file line number Diff line number Diff line change
Expand Up @@ -924,4 +924,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/mods/Dockerfile-5.5
Original file line number Diff line number Diff line change
Expand Up @@ -912,4 +912,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/mods/Dockerfile-5.6
Original file line number Diff line number Diff line change
Expand Up @@ -930,4 +930,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/mods/Dockerfile-7.0
Original file line number Diff line number Diff line change
Expand Up @@ -973,4 +973,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/mods/Dockerfile-7.1
Original file line number Diff line number Diff line change
Expand Up @@ -971,4 +971,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/mods/Dockerfile-7.2
Original file line number Diff line number Diff line change
Expand Up @@ -977,4 +977,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/mods/Dockerfile-7.3
Original file line number Diff line number Diff line change
Expand Up @@ -924,4 +924,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/mods/Dockerfile-7.4
Original file line number Diff line number Diff line change
Expand Up @@ -771,4 +771,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/mods/Dockerfile-8.0
Original file line number Diff line number Diff line change
Expand Up @@ -755,4 +755,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/prod/Dockerfile-5.2
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/prod/Dockerfile-5.3
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/prod/Dockerfile-5.4
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/prod/Dockerfile-5.5
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/prod/Dockerfile-5.6
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/prod/Dockerfile-7.0
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/prod/Dockerfile-7.1
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/prod/Dockerfile-7.2
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/prod/Dockerfile-7.3
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/prod/Dockerfile-7.4
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/prod/Dockerfile-8.0
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
4 changes: 2 additions & 2 deletions Dockerfiles/prod/data/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e
set -u
set -p pipefail
set -o pipefail


###
Expand Down Expand Up @@ -190,4 +190,4 @@ execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}"
### Startup
###
log "info" "Starting supervisord" "${DEBUG_LEVEL}"
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
exec "${@}"
1 change: 1 addition & 0 deletions Dockerfiles/work/Dockerfile-5.2
Original file line number Diff line number Diff line change
Expand Up @@ -516,4 +516,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/work/Dockerfile-5.3
Original file line number Diff line number Diff line change
Expand Up @@ -573,4 +573,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/work/Dockerfile-5.4
Original file line number Diff line number Diff line change
Expand Up @@ -610,4 +610,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/work/Dockerfile-5.5
Original file line number Diff line number Diff line change
Expand Up @@ -631,4 +631,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/work/Dockerfile-5.6
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/work/Dockerfile-7.0
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/work/Dockerfile-7.1
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/work/Dockerfile-7.2
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/work/Dockerfile-7.3
Original file line number Diff line number Diff line change
Expand Up @@ -631,4 +631,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/work/Dockerfile-7.4
Original file line number Diff line number Diff line change
Expand Up @@ -625,4 +625,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions Dockerfiles/work/Dockerfile-8.0
Original file line number Diff line number Diff line change
Expand Up @@ -534,4 +534,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
4 changes: 2 additions & 2 deletions Dockerfiles/work/data/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e
set -u
set -p pipefail
set -o pipefail


###
Expand Down Expand Up @@ -217,4 +217,4 @@ execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}"
### Startup
###
log "info" "Starting supervisord" "${DEBUG_LEVEL}"
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
exec "${@}"
1 change: 1 addition & 0 deletions build/ansible/DOCKERFILES/Dockerfile-base.j2
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions build/ansible/DOCKERFILES/Dockerfile-mods.j2
Original file line number Diff line number Diff line change
Expand Up @@ -439,4 +439,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions build/ansible/DOCKERFILES/Dockerfile-prod.j2
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions build/ansible/DOCKERFILES/Dockerfile-work.j2
Original file line number Diff line number Diff line change
Expand Up @@ -547,4 +547,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

0 comments on commit 2643b28

Please sign in to comment.