Tag: php

can't upate php.ini file in Docker container

I’m trying to set Magento2 on Docker with Nginx & PHP7. I’ve added a custom php.ini file as recommended by the PHP7 Docker image. I can see from phpinfo.php that it’s loading my php.ini file but none of my updates are there. It should be: memory_limit = 2G max_execution_time = 800 I’ve checked the PHP […]

Docker apache2 will not consider new 000-default.conf

I am trying to dockerize Laravel 5.2 app. For this I am using following images, php:apache mysql:5.7 Below is my docker-compose.yml web: build: . volumes: – ./:/var/www/html ports: – “9899:80” links: – db command : [/usr/sbin/apache2ctl, -D, FOREGROUND] db: image: mysql:5.7 volumes: – /home/data:/var/lib/mysql environment: MYSQL_DATABASE: custom MYSQL_ROOT_PASSWORD: custom And my Dockerfile FROM php:apache RUN […]

Web development transition from MAMP to Docker

I am new to Docker and I am having a hard time applying its core technology to my present web development. Using MAMP, you just need to download the app, put your PHP/HTML files on /htdocs, start servers, then go to http://localhost:8888/ to see your webapp. Now, using docker, I’m wondering how can I do […]

Docker with php built-in server

I’m trying to run php built-in server (php -S localhost:8080) via docker, I cannot access site from the host though – I always end up with Connection reset. Here’s a simple Dockerfile I build on: FROM centos:centos6 RUN rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm RUN rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm RUN yum –enablerepo=remi,remi-php55 install -y php […]

Docker mysql cant connect to container

I’ve got docker-compose file for creating mysql image and expose port to 3306, but when I try to install CMS, it gives me error that it can’t connect to Database. I try to scan port 3306 and it’s showing me that it’s open so mysql is running. Why the two of docker containers can’t see […]

Run Docker PHP-apache: Forbidden You don't have permission to access / on this server

I have a folder: my-php-app and it contains a Dockerfile and a src/ folder. The Dockerfile is very simple: FROM php:5.6-apache COPY config/php.ini /usr/local/etc/php/ COPY src/ /var/www/html/ My src/ contains an index.php The index.php contains <html> <body> <?php echo ‘<p>Hello World!</p>’; ?> </body> </html> I did the following: docker build -t my-php-app . The new […]

Apache, PHP, WordPress caching issue in Docker container

I’m on OS X using the Virtualbox driver for docker. Using the official WordPress docker image, I setup a volume from my local machine to map to the container /Users/gezimhome/projects/zr/src:/var/www/html/wp-content/plugins/zr When I update files in the host, they show updated in the container but changes don’t reflect on the website until a few minutes later. […]

Docker : Sharing a volume on Windows with Docker toolbox

I’m trying to setup a dev environment trough a docker container on my windows 7 computer. I’ve installed Docker toolbox for windows. I have an image with apache and php5.6 within, here it is : FROM php:5.6.15-apache RUN apt-get update && apt-get install -y \ apt-utils vim git php5-mysql php5-memcache php5-memcached php5-intl \ wget RUN […]

Issue with docker compose: container command not found

I’m having an issue when trying to start multiple containers with docker-compose: Dockerfile: FROM nginx:1.9 ADD ./nginx-sites/default /etc/nginx/sites-available/default docker-compose.yml: version: “2” services: web: build: . ports: – “80:80” volumes: – ./src:/var/www links: – fpm fpm: image: php:7-fpm volumes: – ./src:/var/www When I use docker-compose up to start the application, I get the following error: ERROR: […]

How to install pdo driver in php docker image?

I am using as a base the php docker container with the tag: php:5.6-apache I linked it with a basic mysql:5.6 image which I can reach at the host mysql. I created a DB, and filled a table with basic values. Yet trying to access my app, I get: Fatal error: Uncaught exception ‘PDOException’ with […]

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