Skip to content

php-redis:dockerfile refactor #558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions guestbook/php-redis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM php:5-apache
FROM docker.io/library/php:5-apache

RUN pear channel-discover pear.nrk.io
RUN pear install nrk/Predis
Expand All @@ -21,9 +21,10 @@ RUN pear install nrk/Predis
# /proc/self/fd/{1,2} are Unix sockets and apache will not be able to open()
# them. Use "cat" to write directly to the already opened fds without opening
# them again.
RUN sed -i 's#ErrorLog /proc/self/fd/2#ErrorLog "|$/bin/cat 1>\&2"#' /etc/apache2/apache2.conf
RUN sed -i 's#CustomLog /proc/self/fd/1 combined#CustomLog "|/bin/cat" combined#' /etc/apache2/apache2.conf
RUN sed -i \
-e 's#ErrorLog /proc/self/fd/2#ErrorLog "|/bin/cat 1>&2"#' \
-e 's#CustomLog /proc/self/fd/1 combined#CustomLog "|/bin/cat" combined#' \
/etc/apache2/apache2.conf

ADD guestbook.php /var/www/html/guestbook.php
ADD controllers.js /var/www/html/controllers.js
ADD index.html /var/www/html/index.html
# Copy application files
COPY guestbook.php controllers.js index.html /var/www/html/