Install Docker Ubuntu 20

= At first: install docker:
Thanks to: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04
/ So it seems, that a certain container is made from image. Image is like a class and container is like an instance of this class /
Ok, it seems to be better to use Laravel Sails.
For that you need first to install

sudo apt install docker-compose

then:

curl -s https://laravel.build/example-app | bash
cd example-app
./vendor/bin/sail up

Now should your app be available on localhost:80. If you get an error message from nginx, then maybe nginx runs on that port. Then you need to stop this process: sudo service nginx stop.

If you need to get docker tutorial, run:

docker run -dp 80:80 docker/getting-started

Then access it on localhost:80

Developing laravel app needs usually three containers – php, nginx, db.
For creating these three images you need file docker-compose.yml.
As a rule of thumb, each container should only run one process; roughly translated, that means that each container should only run a single piece of software. Read from here
environments is for defining environment variables for the container. Here, most of them receive the value of existing environment variables, which are loaded from the .env file at the root of the project – docker-compose.yml automatically detects and imports the content of this file. For instance, in the MYSQL_ROOT_PASSWORD: ‘${DB_PASSWORD}’ line, the container’s MYSQL_ROOT_PASSWORD environment variable will receive the value of DB_PASSWORD from the .env file.

More info thanks to: https://www.digitalocean.com/community/tutorials/how-to-set-up-laravel-nginx-and-mysql-with-docker-compose
And more thanks to: https://buddy.works/guides/laravel-in-docker
More: https://www.digitalocean.com/community/tutorials/how-to-install-and-set-up-laravel-with-docker-compose-on-ubuntu-20-04
More: https://www.cloudsigma.com/deploying-laravel-nginx-and-mysql-with-docker-compose/