Tag: php

How to set new folders inherit folder permission in Docker volume on Mac

I am using Docker-machine on Mac for a PHP application. My code is shored in mac, and shared to docker-machine as volume. This is my docker-compose.yml app: build: . volumes: – .:/var/www/html My PHP application will create a folder in the shared volume and write some files in it. The shared volume is set to […]

Uncaught exception 'RedisException' with message 'Connection closed'

Trying to set up a redis session on my php inside a Docker container, it gives me the above error message when loading the php page. I read this question http://stackoverflow.com/questions/35993130/phpseclib-fatal-error-uncaught-exception-runtimeexception-with-message-conn but it didn’t help me. I run redis and httpd/php on the same host inside a docker container. From a simple php script I […]

Multi Docker container with PHP7 fpm and nginx

I am having issues with setting up a multi docker container environment. The idea is pretty standard: One container have php-fpm running Another is a nginx proxy My phpfpm Docker file is as simple as: FROM php:7.0-fpm # install the PHP extensions we need RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev && rm […]

Can't make nginx and php-fpm dockers communicate

I have created two docker images to match my needs, here is the nginx one: FROM alpine:3.3 RUN apk add –update nginx EXPOSE 80 443 CMD nginx -c /www/dev/nginx/conf/nginx.conf -g ‘daemon off;’ then the php-fpm FROM php:7.0-fpm RUN apt-get update RUN apt-get install -y apt-transport-https ca-certificates dcmtk libgdcm-tools wkhtmltopdf libdbd-freetds libfreetype6-dev \ libjpeg62-turbo-dev \ libmcrypt-dev […]

Docker “Operation not permitted” issue on Windows

I’m trying to use Docker on Windows through Docker Toolbox, but I’m struggling to make it work. I’ve pulled Docker PHP image. For example, this simple ls command fails: $ docker run -it –rm -v /$(pwd):/home/projects php:7.0-cli ls -l /home/projects ls: cannot open directory /home/projects: Operation not permitted Also, any other operation within the mounted […]

PHP application moving to Docker failed to connect on AWS

I have an application that is currently running successfully in the following configuration: nginx platform PHP 7.0 redis driver pdo driver running under an ec2 instance ubuntu, connecting to an rds instance to a mysql 5.6. My goal is to start slowly migrating the application to self contained docker component for php. here is the […]

apache-php doesn't start with docker-compose

I have this container which seems to not work, and I’m unable to figure why, it left no logs FROM debian:latest RUN apt-get update && apt-get -y install apache2 libapache2-mod-php5 RUN apt-get -y install postgresql php5-pgsql RUN apt-get update && apt-get -y install php5-common php5-cli php5-fpm php5-mcrypt php5-pgsql php5-apcu php5-gd php5-imagick php5-curl php5-intl RUN a2enmod […]

custom script on docker run

I am trying to install the skeleton application of Zend Framework 3 with Docker. The installation works fine, but I’m not able to run some composer scripts. In the composer.json there are some custom composer scripts, which should be generally launched with composer cs-fix I would like to lauch there commands with the Composer Docker […]

error 7#7: *1 upstream prematurely closed connection while reading response header from upstream

I have just compiled php7 in a docker container, and try to serve it with ngnix (which is also in a docker container). and using php-fpm … I just serve a simple php file index.php with a simple line: echo “Hello World”; for a test. In the log of docker-compose up, for the ngnix server […]

403 on Laravel Docker setup

I have been struggling to setup my dev enviroment based on Docker to run Laravel app. But it keeps showing me 403 Forbidden error Below is my configuration. I tried to login to nginx container and tail -f /var/log/nginx/error.log but it does not write anything. Please guide me what i am doing wrong here. Thanks […]

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