Dockerfile: redirect the contributor to update.sh

The `*/*/Dockerfile` are created from `Docker*template` by the
update.sh script. We add a comment at the beginning of the file with
information to find their origin. We also make them readonly to remind
people who would like to improve these files that they are not meant
to be modified.
This commit is contained in:
Loic Dachary 2018-03-31 11:43:55 +02:00
parent bb42fcfaed
commit 18db7e679f
No known key found for this signature in database
GPG Key ID: 283AFA30CA7F55A4
10 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,4 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.1-apache FROM php:7.1-apache
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies

View File

@ -1,3 +1,4 @@
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
FROM php:7.1-fpm-alpine FROM php:7.1-fpm-alpine
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies

View File

@ -1,3 +1,4 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.1-fpm FROM php:7.1-fpm
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies

View File

@ -1,3 +1,4 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.1-apache FROM php:7.1-apache
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies

View File

@ -1,3 +1,4 @@
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
FROM php:7.1-fpm-alpine FROM php:7.1-fpm-alpine
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies

View File

@ -1,3 +1,4 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.1-fpm FROM php:7.1-fpm
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies

View File

@ -1,3 +1,4 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.1-apache FROM php:7.1-apache
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies

View File

@ -1,3 +1,4 @@
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
FROM php:7.1-fpm-alpine FROM php:7.1-fpm-alpine
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies

View File

@ -1,3 +1,4 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.1-fpm FROM php:7.1-fpm
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies

View File

@ -55,7 +55,10 @@ function create_variant() {
# Create the version+variant directory with a Dockerfile. # Create the version+variant directory with a Dockerfile.
mkdir -p "$dir" mkdir -p "$dir"
cp "Dockerfile-${base[$variant]}.template" "$dir/Dockerfile" template="Dockerfile-${base[$variant]}.template"
rm -f "$dir/Dockerfile"
echo "# DO NOT EDIT: created by update.sh from $template" > "$dir/Dockerfile"
cat "$template" >> "$dir/Dockerfile"
echo "updating $fullversion [$1] $variant" echo "updating $fullversion [$1] $variant"
@ -71,6 +74,8 @@ function create_variant() {
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g; s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g; s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
' "$dir/Dockerfile" ' "$dir/Dockerfile"
# remove write permission as a reminder this file must be modified with this script
chmod -w "$dir/Dockerfile"
# Copy the shell scripts # Copy the shell scripts
for name in entrypoint cron; do for name in entrypoint cron; do