Tag: php

Docker slow non-local database access

We are using Docker for our local development environments, and deploying to Google Cloud Container Engine for production. Our production SQL server is also on Google Cloud. When our container is running on Container Engine, DB access is lightning fast, but is horribly slow when running in our local machines. Some page loads that normally […]

Downgrade to PHP 5.4.45 in Phusion Docker

I’m running a dev environment using Docker and https://github.com/phusion/baseimage-docker. I’ve tried installing PHP 5.4.45 on it, but I always get a PHP 5.5.9 version when running apt-cache policy php5. Every guide uses sudo add-apt-repository ppa:ondrej/php5-oldstable, which I installed but it doesn’t work..any ideas? This is one of the guides I tried: https://www.dev-metal.com/how-to-install-latest-php-5-4-x-on-ubuntu-12-04-lts-precise-pangolin/

Integrate Grunt in docker-compose?

I have two docker compose files that I start with docker-compose f- docker-compose.yml -f docker-compose-osx.yml up The file contents is: docker-compose.yml: version: ‘2’ services: fpm: image: sbusso/php-fpm-ion nginx: image: nginx:stable ports: – “80:80” links: – fpm – db db: image: orchardup/mysql ports: – 3306:3306 environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: myproject and docker-compose-osx.yml version: ‘2’ services: fpm: […]

Unable to connect to socket server running inside docker container

I have a docker compose file which combines nginx and php like this: nginx: image: nginx ports: – “80:80” – “2443:2443” links: – phpfpm volumes: – ./nginx/anonymous.conf:/etc/nginx/conf.d/anonymous.conf – ./logs/nginx-error.log:/var/log/nginx/error.log – ./logs/nginx-access.log:/var/log/nginx/access.log – ./public:/usr/share/nginx/html phpfpm: image: php:fpm expose: – “2443” volumes: – ./public:/usr/share/nginx/html I can see my website i.e index.php page on browser with the virtual […]

Apache/php return full php error track description

I’m using docker php:7.0-apache (more info in https://hub.docker.com/_/php/) and add my old php code. I’m sending the REST to the web server and got a short description in the track error info. How could I configure the apache/php to response the whole track info and not just to replace the info with three dots (‘…’) […]

Breakpoints skipped when remote debugging with eclipse PDT and Docker container (docker for mac)

After quite a bit of effort I have almost got eclipse PDT and remote debugging with a docker container sing docker for mac (no docker machine). However, although the xdebug log says it has connected to the client it fails to hit any breakpoints. I’m using eboraas/apache-php as a base, then installing xdebug with he […]

php-fpm & nginx in separated docker container, can not execute .php file

I’d like to setup an completely LNMP environment with docker on a machine. But there is something wrong with separated php-fpm & nginx container. What I’v done is : pull images from docker.io : docker pull php:7.1-fpm docker pull nginx run with image : docker run -d –name php-fpm -v /data/Docker/php-fpm/configs/:/usr/local/etc/php-fpm.d -v /data/Docker/nginx/html:/var/www/html php:7.1-fpm docker […]

FOS user bundle doesn't keep logged session

I have integrated the FOS user bundle just as the quick guide tells you to do. it seem to work except that once I log in and redirects it loses the session for some reason and I’m back as anonymous user. This is what i get when I log in before I’m redirect back: As […]

How to create docker environments for production and development that match

I’m planning to use docker for PHP development. One question remains open: Examples I have found online suggests that I would mount my source folder to the development container as a volume. Then, when I change some code, the changes would be immediately available in the container. After changing something I could run relevant test […]

Docker + nginx multi-domain configuration problems

Try to configure the official nginx.conf dockingers nginx.conf configuration failed, very little on their knowledge to find a lot of information did not find a solution. Here’s what I tried: YBa docker run -d –name YBa –restart=always -v /Storage/Volumes/App/YBa:/usr/src/myapp php YBb docker run -d –name YBa –restart=always -v /Storage/Volumes/App/YBb:/usr/src/myapp php Nginx docker run -d -p […]

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