We can run php application using docker. In the following steps, we are creating and running php application.
- Create a directory Create a directory to organize files by using following command.
- Create a Php File index.php
- Create a DockerFile Dockefile
- Create Docker Image
- Run the Docker image Now run the docker image. The following command is used to run docker images.
Now look for the available images in the docker container.
The above screen-shot shows that the created image php-app is available.
Output:
Reference:
0 komentar: