Python

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

We'll cover the following

Files#

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

A static HTML file to be served:

templates/index.htm



Define and run an HTTP server, a static files server, and a REST API:

server.py



Docker image definition:

Dockerfile


Result#

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

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

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

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


At this point, you should be good to go with Docker. In the final chapter of this course, you will be given a few more tips that will make your life with Docker smoother.

PHP
.NET Core
Mark as Completed
Report an Issue