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

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

 

主站蜘蛛池模板: 平顶山市| 兴化市| 明光市| 浙江省| 鄂州市| 邵阳市| 固原市| 牙克石市| 涟源市| 什邡市| 五指山市| 平安县| 前郭尔| 洛扎县| 眉山市| 石景山区| 泾川县| 眉山市| 莒南县| 涡阳县| 永定县| 永定县| 商洛市| 罗定市| 衢州市| 乌拉特中旗| 莆田市| 鄂温| 台江县| 淮安市| 兴国县| 绿春县| 诸暨市| 泾阳县| 新乐市| 涟水县| 永川市| 四子王旗| 合山市| 深泽县| 射阳县|