Tag: php

Docker: communication between web container and php container

I’m trying to dockerizing a project runs with php + Apache http server. I learned that I need to have a container for apache http server and another container for php script. I searched a lot but still don’t understanding how that works. What I know now is I should resort to docker networking, as […]

Why Is Apache The Primary Webserver In Docker Containers (for PHP)

When I look at docker projects almost everyone goes with Apache within a container to serve up PHP based apps. For example Piwik. https://github.com/piwik/docker-piwik Yes, most setups have some sort of proxy server in front of the docker containers (typically Nginx). Just wondering why most people use Apache within containers instead of a lighter weight […]

Call to php function syslog in docker container dosn't work

i’m trying to dockerize my php application. I have a container for NGINX and PHP-FPM. My application writes some log data to the syslog via the PHP openlog and syslog functions like this: openlog(“myapp.test”, LOG_ODELAY | LOG_CONS, LOG_LOCAL5); syslog(LOG_INFO, “This is a test”); closelog(); My docker daemon is configured to use the syslog driver: { […]

Docker vs Mysql local server SQLSTATE[HY000] [2003]

I installed a docker with apache2, MySQL, and my project (zend1). I can’t import my big database to MySQL in the docker so I set it to the local Mysql Server 5.7 ( port: 3307) where I imported all the data, and now at localhost, I still see this error. Fatal error: Uncaught exception ‘PDOException’ […]

MySQL docker container crashes

I’m a newbie with Docker and I’m working on a Symfony2 software development project that uses docker with MySQL, nginx and the web app containers in it. I’m constantly being disconnected from MySQL with the following error message : DriverException in AbstractMySQLDriver.php line 115: An exception occured in driver: SQLSTATE[HY000] [2003] Can’t connect to MySQL […]

Symfony app/console command is not running with cronjob inside Docker container

I have created a Docker image and container for my synfony2 application and I have some jobs which I am trying running using CRON. When I am trying run PHP app/console Command manually it’s working. But When CRONJob can’t able to run PHP app/console. All other CRON jobs are working except Symfony app/console commands. I […]

Cant mount volume docker run

Can’t mount volumes with below script docker run –server -p 8080:80 -v /d/XAMPP/htdocs:/var/www/html -d php:7.0-apache When I try docker run –server -p 8080:80 -v /d:/var/www/html -d php:7.0-apache With this command only XAMPP folder is mounting in docker and I don’t see any folders inside, and I have 403 when I try to access root folder […]

How can I use Kalabox with a WordPress Install that has a nested web root?

I have been trying and failing for a week to get Kalabox working with a WordPress install that has a nested web root with Pantheon. I’ve found some great resources, but many of them are for Drupal and they don’t seem to translate to the WP installs, like the great post by Tandem here: https://www.thinktandem.io/blog/2017/05/20/using-pantheon-s-nested-docroot-with-kalabox/ […]

Share docker container permission to php-fpm image from volumes_from

I’m dockerizing an application made in laravel. I made the compose file creating a data container for this application, master, and using nginx and php-fpm for serve it, but all time i got permission problems: salahaddin@TulipanROG  ~/Proyectos/UzmanTech/opus  nginx-server ✚ ●  docker-compose logs -f | grep opus.php  130 ↵  2678  […]

php significant slower on docker then kvm

why php is so slow on docker , insteadly, Java and C application runing on docker is slightly faster then it on kvm comparing performance of php7.1 and php5.5 in docker 1.12 and kvm with yii2,yii1,predis, guzzle. use Nginx + php7.1-fpm/php5.5-fpm Both host servers are 32 core/3.1GHz Cpu and 128GB Mem. And both docker and […]

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