Add CMD php -a; replace awk with magic bash

This commit is contained in:
Joe Ferguson 2014-09-03 11:56:55 -06:00
parent d143b7e287
commit 3904b17616
6 changed files with 13 additions and 3 deletions

View File

@ -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"]

View File

@ -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"]

View File

@ -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"]

View File

@ -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"]

View File

@ -1,4 +1,3 @@
ENV PATH $PATH:/usr/local/apache2/bin
WORKDIR /var/www/html

View File

@ -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