Tim’s Weblog Tim's Weblog
Tim Strehle’s links and thoughts on Web apps, managing software development and Digital Asset Management, since 2002.

First steps: A Symfony 4 PHP app in Docker

I’m currently learning Docker, and finding out how to develop a (new) Symfony 4 (PHP 7) application locally on my Mac and run it within a Docker container, instead of hosting it in a Linux VM in VMware Fusion as I used to do. Docker Desktop and the PhpStorm IDE are already installed.

Docker setup

I want to use official, current Docker images from the Docker Hub. A colleague convinced me (better scalability?) to use Nginx instead of my trusty old Apache Web server. So I need the nginx:latest and php:fpm images.

While I can use the Nginx image as-is, I need to create my own image on top of the PHP standard one since I will want to add PHP extensions as needed, and to run Composer in the container. I ended up with this Dockerfile:

Read the full article…

Mon, 10 Jun 2019 19:09:00 +0000