Tag: php

docker build : Fatal error: Class 'Memcached' not found

I’m dockerizing a project made with symfony framework. following error occured. Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. Package operations: 28 installs, 0 […]

How to create a docker image for php and node?

I am trying to create a docker container for my angular that has php file in it. Angular requires npm so I need to have nodejs installed. I don’t need apache for my project, just pure php should work fine. My understanding is I should have a FROM node:latest ..install php here RUN mkdir -p […]

Docker container connect to MySQL database locally -> redirect to another container

I am new to Docker. I have read that it is better to keep an app per container. I need to run web app (LAMP stack). So I have found the container for running PHP + Apache. Now I need to set up a mysql container. But I am not sure what is the correct […]

Docker: php7.0-fpm Executable file not found in $PATH

I am building a Debian 9, NGINX, PHP7 FPM containers. I have this in my php7-fpm docker file (which is based on Debian 9) The problem occurs (I think) when I have this closing line: ENTRYPOINT [“php7.0-fpm”] I have used this before in previous docker build but this one is causing issues with the following […]

How to view php logs information with php docker container?

I have a php-fpm docker container . Php-fpm is run inside container, can i get php-fpm’s log on host machine? If i can, how to do?

Multiple versions of PHP through Nginx in Docker

I run two docker containers for PHP5.6: docker run –name php5 \ -v /html1:/var/www/html/site1 \ -d -p 9001:9000 php:5.6-fpm And for PHP7: docker run –name php7 \ -v /html2:/var/www/html/site2 \ -d -p 9000:9000 php:7-fpm I run Docker container with Nginx: docker run –name nginx-cache \ -v /nginx.conf:/etc/nginx/nginx.conf \ -v /nginx/html1:/var/www/html/site1 \ -v /nginx/html2:/var/www/html/site2 \ -v […]

In docker container connect from inside to local apache not happening

Problem I visit page by browser http://localhost, I see content of public folder. The problem is, when I run tests, curl won’t connect with message: cURL error 7: Failed to connect to localhost port 80: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) (GuzzleHttp\Exception\ConnectException) I run tests by command: docker-compose run –rm php php vendor/bin/behat docker-compose.yml version: ‘2’ services: […]

PDO connection error when running PHINX migration on a Docker Container

I am trying to run a migration using Phinx from my host machine (OSX Sierra) but I keep getting PDO connection error. It’s a simple LAMP stack and is working fine otherwise. Here is my docker-compose: version: ‘2’ services: apache: build: context: ./docker/apache-php7 dockerfile: Dockerfile volumes: – ./app:/var/www ports: – “80:80” – “443:443” networks: – […]

Nginx in Docker container won't run PHP

I’m beginner with Docker, and I’m trying to build my own image: Ubuntu + Nginx + PHP. So, I have a directory called test. Inside directory two other directories, app and sites-enabled. Also, there’s a Dockerfile, with content: FROM ubuntu:trusty RUN apt-get update && \ apt-get install -y nginx php5-fpm php5-mysql php-apc php5-imagick php5-imap php5-mcrypt […]

How to make communicate between nginx and php container

I have PHP web application and i want to convert it into docker. I have these containers mysql php nginx I have source code in my host folder as /var/www/site1 Now when i launch nginx , then i can mount site1 to nginx as /usr/nginx/share/html But i am not sure how does i link with […]

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