Tag: php

Craft CMS With Php/Nginx on Docker can't write outside Document Root

I’m trying to set up a containerized version of a basic Craft CMS set up using Docker with Php and Nginx. Craft can’t seem to write to folders outside of my Nginx Document Root. (See bottom of post for more details) I’m using Docker-Compose and this is my current Docker-compose.yml: nginx: build: ./compose/nginx/ ports: – […]

Docker gd module for PHP 7

I’ve got docker file, which is configured for Drupal 8, but after I fired up “docker-compose up”, everything went smooth but in installation of Drupal it’s showing me that “gd” module for PHP is not enabled. here is my Dockerfile: FROM php:7-fpm # Install modules RUN apt-get update RUN apt-get install -y software-properties-common RUN DEBIAN_FRONTEND=”noninteractive” […]

Docker + Nginx deleted folder issue

I have been trying to setup this docker image: https://github.com/Muraad/joomla-docker In practice it has worked great. Docker builds the image, I can run it in a container, and I can link Joomla with another Docker container running mysql. Joomla is hosted by Nginx and PHP5-FPM. The problem starts when I delete the installation folder. While […]

Docker limit the size of a volume

I make a simple Apache/PHP5 docker environment who use tutum/apache–php. My docker-compose.yml dile : web: build: apache ports: – “80:80” volumes: – /var/www/html/erp:/var/www – /var/www/html/erp/conf/php/php.ini:/etc/php5/apache2/conf.d/30-custom.ini – /var/www/html/erp/conf/apache/sites-enabled:/etc/apache2/sites-enabled My Apache Dockerfile : FROM tutum/apache-php RUN apt-get update && apt-get -yq install php5-mcrypt && apt-get -yq install php5-mcrypt RUN a2enmod ssl RUN /etc/init.d/apache2 restart EXPOSE 80 CMD […]

Not able to see STDERR Output with docker

I’m running a php docker image (php:5.6-apache) which has apache’s error and access logs redirected to STDERR and STDOUT respectively using symbolic links. When I run the docker image in the foreground or access the docker container logs, I can see the STDOUT output. But I don’t see any errors (even when I generate php […]

Docker, varnish, Connection reset by peer

I’m just trying to set up a web server using Docker. I have 3 different containers: jprjr/php-fpm sudo docker run –name c_php-fpm -v $HOME/data/webstack/www:/srv/http:ro -p 9000:9000 -d jprjr/php-fpm nginx sudo docker run –name c_nginx -v $HOME/data/webstack/www:/usr/share/nginx/html:ro -p 8080:80 –link c_php-fpm:c_php-fpm -d nginx nginx jacksoncage/varnish sudo docker run –name c_varnish -i -d -p 80:80 –link c_nginx:c_nginx […]

PHP development environment with docker (and how to use composer)

I play with docker for a while and I wanted to use this to build a PHP development environment. With PHP I use composer. Despite my research about using docker to build a devlopmenet environment, I essentially found sample code showing how to run an existing PHP app (but not how to make a development […]

Setting up logging with PHP official docker image

I’m using the official PHP docker image but don’t quite know how to setup logging to work. I want to view my error_log() results in a file. Update: I renamed /usr/src/php/php.ini-development to /usr/src/php/php.ini but I only see truncated logs using docker logs.

Setting docker with nginx and php5

Trying to setup docker with nginx and php5. Here’s my Dockerfile FROM nginx:1.9.9 RUN apt-get update RUN apt-get -y install php5-fpm php5-mysql php-apc php5-imagick\ php5-imap php5-mcrypt php5-curl php5-cli php5-gd php5-pgsql\ php5-common php-pear curl php5-json ADD index.html /usr/share/nginx/html/index.html ADD index.php /usr/share/nginx/html/index.php ADD default /etc/nginx/sites-available/default RUN /etc/init.d/php5-fpm restart I am able to build this just fine with […]

Docker: multiple PHP7-FPM containers on different ports

I am playing around with Docker for my local development environment. My setup for now is 5 containers (1 HaProxy + 2 NGINX + 2 PHP7-FPM). The proxy container is used to direct the request based on the url, so if I enter http://project1.dev it will proxy the request to the project1-nginx that uses project1-php […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.