Tag: php

apache-php doesn't start with docker-compose

I have this container which seems to not work, and I’m unable to figure why, it left no logs FROM debian:latest RUN apt-get update && apt-get -y install apache2 libapache2-mod-php5 RUN apt-get -y install postgresql php5-pgsql RUN apt-get update && apt-get -y install php5-common php5-cli php5-fpm php5-mcrypt php5-pgsql php5-apcu php5-gd php5-imagick php5-curl php5-intl RUN a2enmod […]

custom script on docker run

I am trying to install the skeleton application of Zend Framework 3 with Docker. The installation works fine, but I’m not able to run some composer scripts. In the composer.json there are some custom composer scripts, which should be generally launched with composer cs-fix I would like to lauch there commands with the Composer Docker […]

error 7#7: *1 upstream prematurely closed connection while reading response header from upstream

I have just compiled php7 in a docker container, and try to serve it with ngnix (which is also in a docker container). and using php-fpm … I just serve a simple php file index.php with a simple line: echo “Hello World”; for a test. In the log of docker-compose up, for the ngnix server […]

403 on Laravel Docker setup

I have been struggling to setup my dev enviroment based on Docker to run Laravel app. But it keeps showing me 403 Forbidden error Below is my configuration. I tried to login to nginx container and tail -f /var/log/nginx/error.log but it does not write anything. Please guide me what i am doing wrong here. Thanks […]

Can't see staring installation page of wordpress docker container based on alpine linux

Here is my configuration : OS : Windows 10 Enterprise x64 [Version 10.0.14393] Docker Toolbox: Docker version 1.12.5, build 7392c3b docker-compose version 1.9.0, build 2585387 My docker-compose.yml: version: ‘2’ services: wordpress: image: wordpress:4.7.0-php7.0-fpm-alpine links: – “mysql:mysql-database” ports: – 8080:80 – 9000:9000 expose: – “3306” – “8080” – “80” environment: WORDPRESS_DB_PASSWORD: example mysql: image: mysql ports: […]

Network configuration docker PHP API

I’m trying to create a container with the docker API written in PHP (https://github.com/docker-php/docker-php) I can’t figure the way to configure the network using classes, if I remove the lines, container is created fine but without the port configuration : // Debug $name = “service_1”; $port = 7777; /* Container configuration */ $params = [“name”=>$name]; […]

How to find dependencies before installing a PHP extension with Docker

I’ve been looking at using docker to upgrade my PHP, and looking at the official image, I see that because it’s compressed, they added special commands to install extensions, but that the dependencies must be downloaded first. I can’t seem to figure out how I know what dependencies are required. Docker seems a lot more […]

connect a password of mssql server to other services in using docker

Hello there I am practicing Docker and Docker-compose. It is quite fun and cool. I am a beginner also. I am trying to make a docker-compose.yml file for creating 3 services ( I dont know if this is the right term for it) the services are follows: frontend backend database Here is my code docker-compose.yml […]

Error logging in docker running nginx, php-fpm

I use error logging for debugging in php. I define my error_log file in php.ini then output in my terminal: tail -f /path/to/errorlog/error_log. So as I am debugging I can use error_log(‘debug message’). How do I achieve a similar thing with docker running nginx and php-fpm? Have read similar questions (PHP-FPM doesn't write to error […]

Linking custom container on wercker

I create a container in docker and with id/name i box: ujwaldhakal/laravel build: steps: – install-packages: packages: git – script: name: install phpunit code: |- curl -L https://phar.phpunit.de/phpunit.phar -o /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit – script: name: install composer code: curl -sS https://getcomposer.org/installer | sudo php — –install-dir=/usr/local/bin –filename=composer – script: name: install dependencies code: composer […]

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