Changed the database to mariadb to get better compatibility with arm.
You will find an example for doctrine and other for twig commented in index.php.
To make it work I have include a new dependency into the Dockerfile, libicu-dev to be able to install intl through docker-php-ext-install. This means that the built image is like 200mg bigger, however, with it you can set the locale in functions like format_date()
, format_currency()
, etc.
Turn on the lamp docker-compose up --build
In case you want to remove the containers after they finish docker-compose up && docker-compose rm -fsv
Accessible from http://localhost:80
Accessible from http://localhost:8080
You can configure some things throw the .env. Remember not to share it (.gitignore):
- APP_NAME
- ENVIRONMENT
- DB_ROOT_PASSWORD
By default root password to access mysql toor.
Use mysql/init_db.sql
to insert some sql into mysql on start.
Install all the dependencies composer install
.
In case you want use composer from docker:
docker run --rm --interactive --tty \
--volume $PWD/src:/app \
--user $(id -u):$(id -g) \
composer install
Where $PWD is the root directory of this repository.