https://github.com/studyresearchprojects/try-docker-python-server
🐳 A pretty simple try on Docker with a server written in Python
https://github.com/studyresearchprojects/try-docker-python-server
client docker python server test
Last synced: 8 months ago
JSON representation
🐳 A pretty simple try on Docker with a server written in Python
- Host: GitHub
- URL: https://github.com/studyresearchprojects/try-docker-python-server
- Owner: StudyResearchProjects
- Created: 2019-04-21T15:56:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-21T16:37:21.000Z (almost 7 years ago)
- Last Synced: 2025-08-04T01:01:23.103Z (8 months ago)
- Topics: client, docker, python, server, test
- Language: HTML
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://medium.freecodecamp.org/a-beginners-guide-to-docker-how-to-create-a-client-server-side-with-docker-compose-12c8cf0ae0aa)
# Running the Docker Containers
In order to accomplish the steps ahead successfully, you must install Docker first.
[Docker Official Website](https://www.docker.com/get-started)
```bash
# from repository root directory
docker-compose build
```
This command will setup the containers.
Then feel free to run the docker-compose as follows:
```bash
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 ` | 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`