PHP

In this lesson, you will be provided with the basic application image for PHP.

We'll cover the following

Files#

You can find these files in the code/common-development-profiles/demos/php folder.

A static HTML file to be served:

index.php



A simple REST API definition:

myapi.php



URL rewriting rules for Apache:

.htaccess



Docker image definition:

Dockerfile


Result#

Run the following program to display the output of the php application using a docker file.

/
Dockerfile
Your app can be found at: https://811lgmnxmw1xy.educative.run

The resulting image is published as learnbook/php-server. You can run a local container from it with the following command:

Then point your browser to http://localhost:8090


Let’s look at another image in the next lesson.

Node.js
Python
Mark as Completed
Report an Issue