Public | Automated Build

Last pushed: 2 years ago
Short Description
A basic Symfony image that serves a simple demonstration application.
Full Description

This is a demonstration of Symfony running inside a container, built with Composer and with a working connection to a MySQL server.

Be aware that the following things are not best practices, but have been done for simplicity:

  • Credentials have been committed
  • Checks have been disabled to enable Symfony app_dev.php access

If you haven't already, clone this repository:

git clone git@github.com:ethanchiddicks/docker-demo.git

Switch into the folder for this demonstration:

cd docker-demo/symfony-composer

Use docker-compose to run this application. It will automatically build the application container based on the Dockerfile:

docker-compose up -d

You should see Symfony's default screen when you load up your Docker IP in your browser. To find out your Docker IP, use:

docker-machine ip

You can visit app.php/lucky/number to see a custom controller running.

You can run the following command to test that the database connection is configured and working as expected:

docker exec symfonycomposer_application_1 php bin/console doctrine:schema:update --force
Docker Pull Command
Owner
ethanchiddicks
Source Repository