Tag: php

Logging PHP API Request Info from Docker container

I’m working on a project where I have an iOs app connecting to a PHP API. I want to log all incoming requests to the website service for development purposes (ie I need a solution that can turn off and based on an environment variable). The API is run in a docker container, which is […]

docker-compose down default_network error

I have a docker-compose with some php, mysql and so on starting. After a few days, I cannot bring them down as everything stopps instead of mysql. It always gives me the following error: ERROR: network docker_default has active endpoints this is my docker-compose.yml version: ‘2’ services: php: build: php-docker/. container_name: php ports: – “9000:9000” […]

AWS ECS Docker – nginx: [emerg] host not found in upstream

I am trying to run a php + mysql application on with the AWS ECS using docker. The application stack consists of a mysql, elk, php-fpm and nginx docker container. The containers all run on the same docker machine. When the Task starts, the nginx container exits with the following error: nginx: [emerg] host not […]

How can I mount a volume to docker container in OSX?

My ultimate goal is to run different versions of PHP on my local computer for testing. I believe Docker is the best way to accomplish this. I have been able to get a container with Apache and PHP running via this tutorial: https://github.com/tutumcloud/apache–php But the issue is that I cannot mount a volume so that […]

Docker No MySQL connection to Nginx

I build up a compose file that creates nginx, php, mysql, and phpmyadmin. Everything is working for itself. PHPmyAdmin can talk to the mysql container. Nginx can talk to php container. But it seems that nginx or php is not able to talk to mysql. When executing something like mysql_connect(‘localhost’,’florian’,’pw’) it gives back: Uncaught Error: […]

Can't access php-fpm container from apache

I have installed the latest Nextcloud container on my Ubuntu machine. It started successfully with the following command: sudo docker run –name nextcloud –link mysql:mysql -p 9000:9000 -v /data/nextcloud:/var/www/html -d nextcloud:latest The comand sudo docker logs nextcloud shows: AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.3. Set the ‘ServerName’ […]

docker-compose dev/live containers with different packages

There are already some topics with same question: one or two, but form my understanding the answers are only partly covering the topic. In my case I have 4 containers: db, cache, nginx web server and php-fpm. The first three are not subject of interest. Let’s talk about php-fpm. I have a Dockerfile, where I […]

Domain, Nginx and WordPress

I try to install WordPress on an nginx docker container. my domain blog.example.com points to the ip xxx.xxx.xxx.xx/wordpress/ the backend is working like a charm with a domain like this: blog.example.com/wp-admin/options-permalink.php In the Frontend when i want to visit my page it automatically switches blog.example.com to blog.example.com/wordpress my nginx config looks like this: server { […]

Docker – Call to undefined function mcrypt_get_block_size()

In docker I get Call to undefined function mcrypt_get_block_size(), in the container I installed php5-mcrypt and in the php.ini I writted extension=mcrypt.so but don’t working it. sudo docker exec -i -t docker_pbr_1 /bin/bash apt-get update apt-get install php5-mcrypt php5enmod mcrypt /etc/init.d/apache2 restart I’ve PHP 5.6 but php5-mcrypt is not found.

WordPress NGINX conf routes back to Landing Page

I have installed WordPress on an apache server and try to move it to a nginx server in a docker host. But I struggle some permalink issues. Landing Page works like a charm, but if I click on som Posts, I will be redirected to the Landing Page. The URL in the Browser changes, but […]

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