Tag: php

Is there any way to access a docker (nginx) container via a local url like http://mydomain.dev?

I’m basically using the setup from: https://github.com/wouterds/docker (but not using mysql) The following is my docker-compose.yml file: nginx: image: nginx:1.10.2 ports: – 80:80 restart: always volumes: – ./nginx/conf:/etc/nginx/conf.d – ~/server/firebase-test/code:/code links: – php depends_on: – php php: build: php expose: – 9000 restart: always volumes: – ./php/conf/php.ini:/usr/local/etc/php/conf.d/custom.ini – ~/server/firebase-test/code:/code It works correctly if I go […]

docker php:7.1-fpm-alpine fails to build GD

Trying to build from the official php:7.1-fpm-alpine image, using the following excerpt in my Dockerfile: FROM php:7.1-fpm-alpine RUN set -ex \ apk add –no-cache –virtual .build-deps \ freetype-dev \ libjpeg-turbo-dev \ libpng-dev \ \ && docker-php-ext-configure gd \ –with-freetype-dir=/usr \ –with-png-dir=/usr \ –with-jpeg-dir=/usr \ && docker-php-ext-install gd \ && apk del .build-deps When attempting to […]

Docker compose external links alias with http protocol

I have a problem using docker compose link alias. I host a PHP application on docker and use curl in the application this is my docker-compose.yml php: external_links: – apache:my-apache That links is working. I have my-apache item on /etc/hosts 172.17.0.5 my-apache But the problem comes when i use php curl to access my-apache service, […]

Docker php excel error (php://output) i/o stream

Currently, I am running two servers: one for development and the other for docker service. Under the same environments, when I execute php-fpm in Docker container, php excel that was working in devleopment server is not working in docker service. The error in the code is below(I cannot identify the error on browser): $objPHPExcel->getActiveSheet()->setTitle(‘오더내역-‘.$d->format(‘Ymd’)); $objPHPExcel->setActiveSheetIndex(0); […]

PHPfpm and Nginx not working in Docker with Supervisord

I am running 2 processes inside a docker container an Nginx server and PHP-FPM with supervisord but it just keep exiting with status 1 (unexpected) Here are the logs 2016-12-09 21:37:35,529 CRIT Supervisor running as root (no user in config file) 2016-12-09 21:37:35,596 INFO RPC interface ‘supervisor’ initialized 2016-12-09 21:37:35,598 INFO supervisord started with pid […]

Docker php url access

I’ve build my php images with Docker and running it with : docker run -d -p 8080:8080 –name r-lafermeduweb lafermeduweb But i can’t access to my app. I’ve test my 192.168.10.xx:8080, and not found. I’ve try with : docker inspect –format ‘{{ .NetworkSettings.IPAddress }}’ 0005086cf69c // return 172.17.0.2 But 172.17.0.2:8080 not exist too. Do you […]

Xdebug inside docker in PhpStorm doesn't work

I have trouble getting xdebug to work inside docker on a remote VPS. Is this even possible? I have tried almost every possible combination of values but nothing seems to work. I’d like to remotely debug a PHP app inside a docker container, more specifically Laradock. Is there something wrong in my configuration? For the […]

How to email from WordPress in Docker container?

I have a little issue with WordPress image, will be thankful for any help. I have existing database, which I import with dump. My Mysql Dockerfile listing below: FROM mariadb:10.1.20 COPY dump/dump.sql /docker-entrypoint-initdb.d ENV MYSQL_ROOT_PASSWORD pass CMD [“mysqld”] This is WordPress Dockerfile, here I import my wp-content folder from src directory: FROM wordpress:latest COPY ./src […]

Mystery of the Restarting Docker Container

I have noticed a pattern that is easily reproducible but I can not answer why for the life of me its happening. For some reason if I use the command docker-compose kill (to kill all the containers), and then start it back up again with docker-compose -d my web container gets stuck into an infinite […]

Symfony2 is running extremely slow on php7-fpm on multi docker

I am trying to setup symfony2 environment on multi-docker using php7-fpm and nginx. The whole thing works. However, for some inexplicable reason, every request takes 20-30 seconds to complete (the whole page loads in about 5 minutes). And during the load, the CPU spikes. I tried playing with php fpm config, nginx config. Even copied […]

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