官术网_书友最值得收藏!

Installing Docker

We will use Docker in this chapter. Even though the official documentation of Laravel suggests the use of Homestead with virtual machines and Vagrant, we chose to use Docker because it's fast and easy to start, and our main focus is on Laravel's core concepts.

You can find more information about Docker at  https://www.docker.com/what-docker.

As the Docker documentation states:

Docker is the company driving the container movement and the only container platform provider to address every application across the hybrid cloud. Today’s businesses are under pressure to digitally transform, but are constrained by existing applications and infrastructure while rationalizing an increasingly diverse portfolio of clouds, datacenters, and application architectures. Docker enables true independence between applications and infrastructure and developers and IT ops to unlock their potential and creates a model for better collaboration and innovation.

Let's install Docker, as follows:

  1. Go to https://docs.docker.com/install/.
  2. Choose your platform and follow the installation steps.
  3. If you have any trouble, check the getting started link at https://docs.docker.com/get-started/.

As we are using Docker containers and images to start our application and won't get into how Docker works behind the scenes, here is a short list of some Docker commands:

Command:           Description:

docker ps            Show running containers

docker ps -a            Show all containers

docker start            Start a container

docker stop            Stop a container

docker-compose up -d            Start containers in background

docker-compose stop            Stop all containers on docker-compose.yml file

docker-compose start            Start all containers on docker-compose.yml file

docker-compose kill            Kill all containers on docker-compose.yml file

docker-compose logs            Log all containers on docker-compose.yml file

 

主站蜘蛛池模板: 麻城市| 金塔县| 沈阳市| 家居| 鹤岗市| 昭通市| 梨树县| 汝州市| 镇雄县| 垫江县| 留坝县| 任丘市| 台北县| 阜南县| 宁国市| 固镇县| 丰县| 宜黄县| 深州市| 泽普县| 彰化市| 武威市| 贵德县| 喀什市| 织金县| 张家界市| 阳谷县| 延长县| 呼玛县| 延庆县| 益阳市| 呼伦贝尔市| 广平县| 佛冈县| 阿鲁科尔沁旗| 华池县| 鄂托克前旗| 周宁县| 彰化县| 依安县| 江永县|