Docker and Laradock Setup Successful Notes for MAC (tested)(8 GB RAM)
- For windows you might need extra memory more than 4 GB RAM.
- iMac (21.5-inch, 2017) i5 - 8GB RAM DDR4
- macOS (High Sierra) v10.13.6
Before starting with laradock, make sure you are creating 1 directory
example setup :
+ laraveldocker
+ + laradock (put laradock inside laraveldocker folder)
+ + yourproject_1
+ + yourproject_2
+ + yourproject_3
+ + yourproject_......
// register that laravel folder in docker preferences
right click docker
> Preferences
> File Sharing
> click "+" / Add
> add that folder (laraveldocker)
- - - in my dir is : /Applications/XAMPP/xamppfiles/htdocs/laravel
> Apply & Restart
// install docker
// error notes ? vm cannot be create
// make sure your memory is big enough
// # # and read this notes : https://sharezone47.blogspot.com/2019/05/docker-unable-to-create-ErrorActionPreference.html
// docker compose build (this is the most fatal things in docker)
$> docker-compose
$> docker-compose up -d nginx mysql phpmyadmin redis workspace
$> docker-compose up apache2 php-fpm mysql phpmyadmin
$> docker-compose up nginx php-fpm mariadb adminer
$> docker-compose restart nginx
$> docker-compose restart apache2
$> docker-compose down
// to stop docker // example
docker-compose stop nginx
// see running container (docker and docker-compose)
docker ps
docker-compose ps
127.0.0.1 laravel.test
127.0.0.1 sheezy.local
127.0.0.1 nonlaravelapp.local
// sites nginx
$> cp laravel.conf.example yoursites.conf
// go inside mysql
docker-compose exec mysql bash
docker-compose exec mysql mysql -u homestead -psecret
// go inside
$> docker-compose exec workspace bash
// reference
# https://sharezone47.blogspot.com/2019/05/docker-unable-to-create-ErrorActionPreference.html
# https://sudonull.com/posts/332-Laravel-Docker-Our-Successful-Experience
EmoticonEmoticon