Tag: php

How to separate ffmpeg and php container in docker

In my project, after upload video to web server I have to convert .avi to .webm. As I have read from many tutorials I can do it with exec() but my project is using docker. Can I separate ffmpeg and php container or I have to install ffmpeg inside php container?

Sendmail in DOCKERized PHP-Application doesn't work

When trying to send an email with PHP function sendmailoversmtp($name, $mail, $message, $topic) It does not work. The following error is logged: sh: 1: -t: not found -t -i is configured as sendmail_path in my php.ini. Why is it not found? My Dockerfile is based on FROM php:7.0-apache

How do I integrate my git PHP repo into an official Docker Hub container?

In the official Docker Hub PHP 5.6 / Apache Dockerfile, Apache is pointed by default at /var/www/html. The Dockerfile does a lot of directory setup using this directory as the assumed docroot. Most instructions on deploying PHP applications in a Docker container include an instruction like this for the dockerfile: ADD src/ /var/www/html/ This is […]

nginx+php-fpm docker-compose not work

I can’t to configure nginx + php-fpm use docker-compose . my docker-compose.yml nginx: build: nginx/. ports: – “80:80” links: – php-fpm volumes: – ./code:/var/www/html – ./nginx/nginx:/etc/nginx – ./nginx/logs:/var/log/nginx php-fpm: build: php-fpm/. volumes: – ./code:/var/www/html nginx dockerfile FROM nginx EXPOSE 80 php-fpm dockerfile FROM php:7.0-fpm EXPOSE 9000 Browser shows me 502 Bad Gateway nginx error.log give […]

Commands in Dockerfile don't seem to be running

So i’m extremely new to docker, and I am having trouble setting up my docker environment. My Dockerfile looks like so FROM php:7.0-apache # Enable mod_rewrite RUN a2enmod rewrite RUN /usr/bin/apt-get update && \ apt-get -y install git php5-dev libpcre3-dev gcc make graphicsmagick libgraphicsmagick1-dev && \ /usr/bin/git clone git://github.com/phalcon/cphalcon.git && \ cd cphalcon/build/ && \ […]

Docker Service Separation

I am not sure how to separate the services on my server properly with docker. I have an application written in NodeJS and two applications written in PHP. I use NGINX as a webserver/reverse-proxy and MySQL as my database. I am not quite sure which docker container should handle which task and where to store […]

MySQL 2002 Connection Refused – OSX/MySQL/Docker

I attempted this answer on How to allow remote connection to mysql, but I am still getting the following error: PDOException in Connector.php line 55: SQLSTATE[HY000] [2002] Connection refused Note: the above is while using “” as the DB_HOST, when using “localhost” instead, the error is: PDOException in Connector.php line 55: SQLSTATE[HY000] [2002] No such […]

Write logs in PHP outside Docker container

I have a task to write logs outside the docker container. It’s a bit problem because I cannot save logs inside the container and we decided to use docker pipe. As you maybe know docker provides logs based on pipes inside Linux. The same approach using in Docker PHP-FPM. So my solution is: $rs = […]

docker install and enable php extension

I trying to use Docker for my Symfony3 project I got it running but I get this error: The LDAP PHP extension is not enabled. It does sound right as I am using Ldap extension for my project. I have tried installing the Ldap extension using Dockerfile for my php image which seems to install […]

Docker – Using Composer inside PHP container

I want to be able to use composer install inside my php-fpm container. My current setup: docker-compose.yml version: ‘2’ services: web: image: nginx ports: – “80:80” volumes: – ./public:/var/www/html – ./vhost.conf:/etc/nginx/conf.d/vhost.conf fpm: image: php:fpm volumes: – ./public:/var/www/html expose: – 9000 composer: restart: ‘no’ image: composer/composer command: install –working-dir=/var/www/html volumes_from: – fpm But obviously my command: […]

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