Docker Enviourment for run mutliple enviourment instance in same machine
- Install Docker
- docker-compose
sudo apt install docker-compose
To build and run docker image
docker-compose up --build
*If already builed then just up the service
docker-compose up -d (run in background)
syntax: docker-compose run -rm -pDockerport:ExternalPort service-name bash
example: docker-compose run --rm -p8700:8000 php8apps bash
*then go to the directory what you want to run
cd example
*then run the project
php artisan serve --host=0.0.0.0 (for laravel project)
*then hit on browser with docker port (we run the project on 8700 port of host machine)
http://0.0.0.0:8700