Skip to content

StudyResearchProjects/try-docker-python-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

try-docker-python-server

🐳 A pretty simple try on Docker with a server written in Python

Motivation

Learn more about Docker. Based on: Gael Thomas, How to create a client/server side with Docker-Compose

Running the Docker Containers

In order to accomplish the steps ahead successfully, you must install Docker first. Docker Official Website

# from repository root directory
docker-compose build

This command will setup the containers.

Then feel free to run the docker-compose as follows:

docker-compose up

Now open your browser and go to the following URL: http://localhost:8080/

You must see an HTML website served by Python's simple HTTP Client.

Commands for Docker Compose

Command Description
docker-compose exec <service name> <command> Executes a command in the specified container
docker-compose ps Lists containers
docker-compose logs Logs from services
docker-compose images Lists images
docker-compose down Stops containers and removes images created in this instance of docker-compose
docker-compose down -v --rmi all --remove-orphans Removes all data generated by the specified instance of docker-compose

About

🐳 A pretty simple try on Docker with a server written in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors