WebClub-NITK / Hacktoberfest-2k20

Repository for Hacktoberfest 2020 Meetup at NITK Surathkal
14 stars 53 forks source link

Dockerize a simple REST API #122

Closed krithikvaidya closed 4 years ago

krithikvaidya commented 4 years ago

Description

Create a simple REST API (that responds to GET and POST requests) in the Web framework of your choice. Then, create a Dockerfile to Dockerize the application. The server should finally run in a container when I type in the following commands in the root folder of the project:

docker build -t rest .
docker run -p 8080:8080 rest

Performing a GET request to the "/" endpoint should return a page saying "Hello", and performing a POST request to the "/" endpoint should return a JSON with the message body "World".

Details

Progress

Directory Structure

Within this repository's 'Development' folder, create a folder called 'Dockerize_REST' (if it doesn't exist yet). Within this folder, place the folder containing your web app and the Dockerfile.

Note

  1. Please claim the issue first by commenting here before starting to work on it. While claiming the issue, mention the framework you will be using.
  2. Once you are done with the task and have created a Pull Request, please tag @krithikvaidya to request a review.
pancreaflame commented 4 years ago

I would like to take this issue. I am going to use Flask + Gunicorn as the framework, then dockerize it.