Skip to content
Docker image for running Symfony project
Shell Dockerfile Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
hooks
samples
.dockerignore
.gitignore
.travis.yml
Dockerfile
Dockerfile-8
Makefile
Makefile.docker
README.md
check.sh
docker-compose.test.yml
docker-compose.yml
start.sh
testRunning.sh

README.md

docker-symfony

Docker Hub repository

Docker Automated buil Build Status

Versions

Version follows php version

  • latest
  • 7.4 (beta)
  • 7.3 (latest)
  • 7.0
  • 5

Image

This image setup a apache2/php container with composer, symfony cmd, php-cs-fixer, xdebug, memcache and imagemagick. It fixs datetime to UTC and sessions are save to redis container.

Features list :

  • apache with php
  • imagemagik extension
  • redis extension
  • xdebug extension
  • pdo, pdo_mysql, pdo_pgsql
  • curl, pdo_sqlite
  • composer bin
  • symfony bin
  • bash completion for symfony
  • bash completion for composer
  • php-cs-fixer bin
  • phpunit

Starting script :

  • disable xdebug on production
  • create and persist composer directory for cache
  • launch init script specified by environment variable for each symfony project before init
  • launch post script specified by environment variable for each symfony project after init
  • make composer install if specified by environment vairable.

Use

Use with docker compose:

docker-compose up -d

Environment variables:

SYMFONY_ENV=prod ##environment for symfony
SYMFONY_DIRECTORY=/var/www ##directory of a symfony project or containing multiple symfony project
SYMFONY_INIT_site1=True ##Launch composer install for symfony project site1
SYMFONY_PREV_site1=./init.sh ##Launch special script before initialisation, script located in $SYMFONY_DIRECTORY/site1/
SYMFONY_POST_site2=./launch.sh ##Launch special script after initialisation, script located in $SYMFONY_DIRECTORY/site2/

Todo

  • Use fonctionnal symfony website for docker-compose.yml, like in docker-compose.test.yml

Donate

Bitcoin Address: 15NVMBpZJTvkefwfsMAFA3YhyiJ5D2zd3R

You can’t perform that action at this time.