mirror of
https://github.com/danog/php.git
synced 2024-11-30 04:29:16 +01:00
Add CMD php -a; replace awk with magic bash
This commit is contained in:
parent
d143b7e287
commit
3904b17616
@ -26,3 +26,5 @@ RUN set -x \
|
||||
&& dpkg -r bison libbison-dev \
|
||||
&& apt-get purge -y --auto-remove autoconf2.13 curl \
|
||||
&& rm -r /usr/src/php
|
||||
|
||||
CMD ["php", "-a"]
|
||||
|
@ -25,3 +25,5 @@ RUN set -x \
|
||||
&& dpkg -r bison libbison-dev \
|
||||
&& apt-get purge -y --auto-remove curl \
|
||||
&& rm -r /usr/src/php
|
||||
|
||||
CMD ["php", "-a"]
|
||||
|
@ -25,3 +25,5 @@ RUN set -x \
|
||||
&& dpkg -r bison libbison-dev \
|
||||
&& apt-get purge -y --auto-remove curl \
|
||||
&& rm -r /usr/src/php
|
||||
|
||||
CMD ["php", "-a"]
|
||||
|
@ -25,3 +25,5 @@ RUN set -x \
|
||||
&& dpkg -r bison libbison-dev \
|
||||
&& apt-get purge -y --auto-remove curl \
|
||||
&& rm -r /usr/src/php
|
||||
|
||||
CMD ["php", "-a"]
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
ENV PATH $PATH:/usr/local/apache2/bin
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
@ -31,7 +31,9 @@ for version in "${versions[@]}"; do
|
||||
exit 1
|
||||
fi
|
||||
|
||||
insert="$(cat "Dockerfile-apache-insert" | sed 's/[\]/\\&/g')"
|
||||
dockerfile="$( cat "$version/Dockerfile")"
|
||||
apacheInsert="$(cat "Dockerfile-apache-insert")"
|
||||
apacheTail="$(cat "Dockerfile-apache-tail")"
|
||||
(
|
||||
set -x
|
||||
sed -ri '
|
||||
@ -39,7 +41,8 @@ for version in "${versions[@]}"; do
|
||||
s/^(RUN gpg .* --recv-keys) [0-9a-fA-F ]*$/\1 '"$gpgKey"'/
|
||||
' "$version/Dockerfile"
|
||||
|
||||
awk -vf2="$insert" '/^\t&& make install \\$/{print f2;next}1' "$version/Dockerfile" "Dockerfile-apache-tail" > "$version/apache/Dockerfile"
|
||||
apacheDockerfile="${dockerfile/?\&\& make install \\/$apacheInsert}"
|
||||
echo "${apacheDockerfile/CMD*/$apacheTail}" > "$version/apache/Dockerfile"
|
||||
)
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user