Tag: php

systemd in a docker container

I have a server with ubuntu 14.04 (that does not use systemd), I use HHVM but I want to use php 7 now. I was thinking, why not use a container with php7.0-fpm, this should work. I first tried with a centos 7 (that uses systemd) container, I could install everything, but the problem is […]

PHPStorm, Docker and debugging

I’m trying to debug php code with PHPStorm. I’m on a Mac with docker. I configured xdebug on docker using: zend_extension=”/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so” xdebug.remote_enable = 1 xdebug.remote_connect_back=1 xdebug.idekey = “PHPSTORM” Then I open the listening on PHPStorm, set the cookie in the browser and then load a page setting a break point in the corresponding point. It […]

Expose environment variables to Apache and PHP

Background I’m trying to use Wercker to run my test for a PHP application. Wercker uses Docker containers to setup a test environment to execute tests in. It uses Environment Variables to expose the connection params for any connected services like MySQL and Elasticsearch. Example MYSQL_PORT_3306_TCP_ADDR = 127.0.1.1 My core Docker containers is running Ubuntu […]

Docker Lavarel Storage Permission Error

I have a Docker container running a PHP Lavarel app. The docker image can be found at: https://hub.docker.com/r/niaquinto/laravel/. When I go to the app in the browser, I get the following error: file_put_contents(/share/app/storage/meta/services.json): failed to open stream: Permission denied Screenshot: http://d.pr/i/1327m I’ve tried: I’ve updated the 1000 user to give www-data ownership over the storage […]

How to insert dockerised cron process in a docker-compose built LEMP stack?

I have a LEMP stack which is built by this docker-compose file: cadvisor: image: google/cadvisor:latest container_name: lemp_cadvisor ports: – “8080:8080” volumes: – “/:/rootfs:ro” – “/var/run:/var/run:rw” – “/sys:/sys:ro” – “/var/lib/docker/:/var/lib/docker:ro” base: build: ./base container_name: lemp_base volumes: – /home/core/server-lemp/www/:/var/www/:rw phpmyadmin: build: ./phpmyadmin container_name: lemp_phpmyadmin links: – base volumes: – /var/www/phpmyadmin – ./phpmyadmin/var/www/phpmyadmin/config.inc.php:/var/www/phpmyadmin/config.inc.php:rw mariadb: build: ./mariadb container_name: lemp_mariadb […]

Docker Compose – symlink in deployment

I have an application with this structure. /path/releases /path/releases/01012016 /path/releases/16012016 /path/releases/etc.. And /path/dev (symlink to some version) /path/stag (symlink to some version) /path/stable (symlink to some version) My docker-compose.yml looks like this: nginx: … volumes_from: – data php: … volumes_from: – data data: volumes: – /path/stable:/var/www I known that Docker resolves symlinks. I have thought […]

“Could not delete ./” when I use composer in docker

When I build my dockerfile, it just show that. Did anyone tried to use composer in docker? Or is there any other way to install the flarum into docker? PS: the user is root. Downloading https://packagist.org/packages.json Writing /root/.composer/cache/repo/https—packagist.org/packages.json into cache Downloading http://packagist.org/p/provider-2013%24d6b22cfddabf0741ef0c5c720daf4f0a5f17ed112a30074bfeef5007a1e30590.json Writing /root/.composer/cache/repo/https—packagist.org/p-provider-2013.json into cache Downloading http://packagist.org/p/provider-2014%2471316c49d46d6c1e66f1d56e3cd12020169065922e83ed72e3319f00146bf8cf.json Writing /root/.composer/cache/repo/https—packagist.org/p-provider-2014.json into cache Downloading http://packagist.org/p/provider-2015-01%244a1f70479a6d65b81b75a0db8f73f0cce3fa08a6f828fe1c93bda72f1943b88d.json Writing […]

PHP date.timezone not found with Docker & PHP-FPM

I’m creating a Symfony environment (PHP-FPM, Nginx, & more) with Docker & Docker-compose. But, PHP does not use my php.ini and ignores the config (date.timezone parameter is not found in my Symfony application). Of course, when I go on my container, the date.timezone is correctly set in the 2 php.ini (cli & FPM). I don’t […]

xdebug only gets triggered via running script from cli and not browser

I have a Docker container running apache2 php5 and xdebug. I can only trigger xdebug when I run a php script from the command line via root on the docker container. I get an xdebug log file with the following entries: Log opened at 2015-11-12 19:34:30 I: Checking remote connect back address. I: Checking header […]

cURL to DropBox using Symfony 3

I use the Gaufrette Bundle of Symfony to access DropBox API. The code in my controller is $dropbox = $this->get(‘acme.dropbox.api’); $dropbox->getAccountInfo(); I get an error Curl error: (77) error setting certificate verify locations: CAfile: rootca CApath: /etc/ssl/certs 500 Internal Server Error – Dropbox_Exception_NotFound I used Docker so not sure if it’s with the way I […]

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