Tag: php

Symfony – Unknown MySQL server host when using command line

So for some reason when I run for example cache:clear I get the following error: But when I view the application through the browser it seem to connect fine to the database because when I edit the parameters.yml with incorrect data it throws an error in the browser saying it cannot connect. I’m using docker […]

Docker Connection Refused Between Nginx And PHP Containers

I’m creating a cluster with my php-fprm compiled from source image and the nginx official image, but when I try to run a phpinfo() file the nginx returns the error below: *5 connect() failed (111: Connection refused) while connecting to upstream, client:, server: localhost, request: “GET /phpinfo.php HTTP/1.1”, upstream: “fastcgi://”, host: “” The docker-compose.yml […]

Installing GD in Docker

I am a complete Docker novice but am having to maintain an existing system. The Dockerfile I am using is as below: FROM php:5.6-apache RUN docker-php-ext-install mysql mysqli RUN apt-get update -y && apt-get install -y sendmail RUN apt-get update && \ apt-get install -y \ zlib1g-dev RUN docker-php-ext-install mbstring RUN docker-php-ext-install zip RUN docker-php-ext-install […]

Laradock: how to enable/install php7 ldap support extension?

I have set up docker with laradock. I’m using the following package “adldap2/adldap2-laravel”: “^2.1” I get the following error: Call to undefined function Adldap\ldap_explode_dn() Should I enter my docker workspace and try to install it? docker-compose exec workspace bash How should I install it? Seems I can’t find php7.0-ldap package from apt-get or apt-cache… Is […]

Docker – install php-memcached extenstion not working?

I have been trying to install memcached in my php-5.6 container, however i am unable to get it working, as i dont see memcached extenstion in phpinfo() and plus for some reason its complianing about that it cant find the memcache.so in the code. there is my docker-file for php build FROM php:5.6-fpm RUN apt-get […]

Apache in Docker won't deliver sites

After installing an apache webserver in a docker container, I wanted to display a sample page just to make sure it works. However I always get 404 Not found. Here’s the dockerfile FROM ubuntu:14.04 MAINTAINER <mail@example.org> RUN DEBIAN_FRONTEND=noninteractive # Install required packages RUN apt-get -y update RUN apt-get install -y apache2 libapache2-mod-php5 php5-gd php5-json php5-mysql […]

How to handle permission inside a volume from docker?

I have a container running a PHP application and the php-fpm service can’t write the cache files inside an folder provided by a docker volume. I gave 777 permissions on the folder I need to write, from the host machine, but it works just for a while. Files created by php-fpm doesn’t have necessary permissions. […]

Setting up a remote interpreter in PhpStorm with docker

In the Settings of PhpStorm, it is possible to add new interpreters. Settings -> Languages & Frameworks -> PHP I have different docker containers running on my machine (Linux Mint) and I would like to reference each of them as an interpreter. I tried to follow the instructions from the doc but didn’t succeed 🙁 […]

Using Docker Nginx, PHP, MySQL on Mac

I’m just starting to get my head around docker and want to use it for a project. I have followed https://docs.docker.com/docker-for-mac/#explore-the-application-and-run-examples and have NGINX running fine and can see the NGINX landing page. Do I need to install php-fpm and mySQL within my container since my container is only NGINX at this stage? How do […]

How can I run my docker container with installed Nginx?

I have docker image with Dockerfile, that successfully build with docker build . command. The Dockerfile content is: FROM ubuntu RUN apt-get update && apt-get install -y nginx php5 php5-fpm ADD . /code How can I run my docker container to see that Nginx is work? UPDATE: When I try to use next Dockerfile: FROM […]

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