Symfony development environment
phpmyadmin: http://localhost:8080/index.php HOST: http://localhost:88 GUIDE : https://gist.github.com/subfuzion/08c5d85437d5d4f00e58
Preparer les containers
docker-compose build
Lancer les containers
docker-compose up -d
To run the console command inside the Docker execute the following command in your terminal:
docker-compose run php composer install
The above command will be executed on php container where we have the access to the PHP-FPM service and the Composer. To run any other command:
c bin/console doctrine:schema:update --force
Drop all intalled container
docker-compose stop $(docker-compose ps -a -q)
Remplacer :
DATABASE_URL=mysql://sf5:sf5@127.0.0.1:3306/db_sf5
par
DATABASE_URL=mysql://sf5:sf5@mysql:3306/db_sf5
To manipulate the repo where the project is created :
docker-compose exec php bash
Purging All Unused or Dangling Images, Containers, Volumes, and Networks
docker system prune
Remove one or more specific images
docker images -a
Remove one or more specific containers
docker ps -a
Resolve conflict master
git checkout master git merge --no-ff hotfix1 git commit -m "resolved conflict and master merged" git push origin master
Return real path
pwd
Set 0777 acces controle to var/cache repository
docker-compose exec php bash // access to container php
cd var
chmod -R 0777 .
- Build container
sudo docker-compose build
- Display the running processes
sudo docker-compose build
- start docker with -watch event
sudo docker-compose top
or Start projectsudo docker-compose start
Creating a new database using mysql program
docker-compose exec mysql bash
mysql -u root -p
CREATE DATABASE db_mydatabase