Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Dragos Holban:
How to Setup Docker for Your Symfony Project
Sep 18, 2017 @ 16:48:31

In a tutorial posted to his Medium.com site Dragos Holban continues his series walking you through Symfony for PHP applications. In this latest part of the series he shows you how to use Docker to set up an environment for a Symfony-based application.

As you probably know, I am a big Symfony fan :) In the last few years I used Vagrant to set up my Symfony development environment more or less as described here. But we now have Docker and it’s time to move forward with a new setup. Docker containers are generally more lightweight than Vagrant virtual machines, so starting and stopping them is extremely fast. They also take a lot less disk space.

He starts by sharing an example Dockerfile and docker-compose.yml to help set up and configure the environment to be ready for use. The configuration sets up Apache, PHP 7, MySQL, git, Composer and several PHP extensions. It then installs a fresh instance of Symfony and runs a bash file to finish the setup. He shares the contents of this file and the VirtualHost configuration for the web server. Finally he shows how to run the setup via the Docker command line tool and what you can expect to see when things are running smoothly.

tagged: docker symfony setup configure dockerfile compose tutorial series

Link: https://medium.com/@dragosholban/how-to-setup-docker-for-your-symfony-project-ff9b1bf44e68


Trending Topics: