Tag: php

Exposing Elastic Beanstalk environment variables to Laravel's artisan using Docker

I’m attempting to deploy my application to production for the first time using Elastic Beanstalk, and I’ve created an RDS instance along with my Elastic beanstalk application. Since my application uses PHP5-FPM, I have to expose these environment variables inside Dockerfile like this: RUN echo ‘env[RDS_HOSTNAME] = $RDS_HOSTNAME’ >> /etc/php5/fpm/pool.d/www.conf RUN echo ‘env[RDS_PORT] = $RDS_PORT’ […]

How to Dockerize a PHP app

I am trying to understand the general process that goes into deploying a PHP web app through Docker. I have a web app developed in LAMP. So far I understood that firs of all I have to download and install Docker itself. Afterwards I have to install the Docker Composer. Then using the Composer I […]

Deploying with Docker into production: Zero downtime

Im failing to see how it is possible to achieve zero-downtime deployments with Docker. Let’s say I have a PHP container running MyWebApp being served by an Nginx container on the same server. I then change some code, as Docker containers are immutable I have to build/deploy the MyWebApp container again with the code changes. […]

Error starting userland proxy: listen tcp0.0.0.0:3306: bind: address already in use

ERROR: for dockervel_mysql_1 Cannot restart container c258b418c03cbd6ec02c349c12cf09403f0eaf42fa9248019af7860d037d6474: driver failed programming external connectivity on endpoint dockervel_mysql_1 (da3dd576458aa1fe3af7b539c48b9d61d97432cf5e9ee02d78562851f53981ae): Error starting userland proxy: listen tcp0.0.0.0:3306: bind: address already in use. I have to make LAravel app and to deliver a Dockerfile ,but i’m realy stuck with this. Before that I had a nightmare wile installing laravel on my […]

How can I overwrite a file through Dockerfile in docker container?

I have to overwrite a file through Dockerfile. In particular on an Ubuntu container with Apache and PHP and I have to overwrite the file php5-cgi.conf. I tried to use the following command: COPY php5-cgi.conf /etc/apache2/conf-enabled/php5-cgi.conf but I had the error: File already exists I have also tried to use the following command RUN cp […]

Create a development environment for Laravel in Docker

I have a custom Laravel installation on my Ubuntu machine. As per Laravel’s instructions however, I didn’t use Homestead to spin up my app. Instead I installed the app using composer on my machine and then installed the dependencies and libraries as per the requirement. Now I want to use another machine for development. How’s […]

How to restart php-fpm inside a docker container?

I’m using docker and my container is build over php:5.6-fpm image from php official repo. Is it somehow possible to restart/reload php-fpm from inside a container?

BOM error, input not detected error

This is my JSON { “name”: “dockerizing-magento”, “description”: “ADockerizedMagentoCommunityEdition”, “require”: { “magento-hackathon/magento-composer-installer”: “v2.1.1”, “magento/core”: “” }, “require-dev”: {}, “repositories”: [], “extra”: { “magento-root-dir”: “web”, “auto-append-gitignore”: true }, “config”: { “discard-changes”: true }, “minimum-stability”: “dev”, “prefer-stable”: true, “scripts”: { “post-install-cmd”: [], “post-update-cmd”: [] } } When i try to composer update it gives error of [Seld\JsonLint\ParsingException] […]

docker PHP-APACHE “You don't have permission to access / on this server”

I’m using the official docker images for apache and php : https://hub.docker.com/_/php/ (the 5.6-apache tag) I’m launching the container like this : docker run -d -p 80:80 –name apache-php56 -v “/home/myUser/www”:/var/www/html php:5.6-apache Of course, I have all my code in “/home/myUser/www” When I am in a directory with an index, it seems like apache is […]

PHP Application redirection cycle

I have this application working on a standard LAMP stack, but when i try to run it in a docker nginx + php-fpm i get an error (using richarvey/nginx-php-fpm. docker container). Edit: This container runs nginx and php-fpm in the same container. http://ip-vm/sistema/index.php/gui/gui/login server { listen 80; ## listen for ipv4; this line is default […]

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