Symfony5 Docker Stack

Based on https://github.com/coloso/symfony-docker

This is a lightweight stack based on Alpine Linux for running Symfony5 into Docker containers using docker-compose.
Build Status

For PHP8 use the following branch: https://github.com/coloso/symfony-docker/tree/php8-dev

Prerequisites

Container

Installing

run docker and connect to container:

 docker-compose up --build
 docker-compose exec php sh

install latest version of Symfony via composer:

# traditional web application: 
$ composer create-project symfony/website-skeleton .

or

# microservice, console application or API:
$ composer create-project symfony/skeleton .

modify your DATABASE_URL config in .env

DATABASE_URL=mysql://root:root@mysql:3306/symfony?serverVersion=5.7

Ready up

call localhost in your browser

Thanks to

https://github.com/coloso/symfony-docker https://github.com/mlocati/docker-php-extension-installer
https://github.com/denji/nginx-tuning