Skip to content

nikhita310/Docker-Rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#RESTful website using Docker

Created a RESTful Web service that displays data of employees in JSON format using two get routes:

  • /employees

  • /employees/id

Steps to run RESTful web service:

  • Create the project with app.py and JSON file in a single folder. The templates folder consists of the index.html file which displays the json result on the webpage

  • A Docker Image is created by running the following command: - "docker build -t employees-image:latest ."

  • You can check the image created using "docker images". You will find the image employees-image under the list.

  • Run the created employees-image image inside a container using the following command "docker run -d -p 5000:5000 --name employees-container employees-image"

  • Check running docker container by "docker ps"

  • App will now be running at the following address: - http://192.168.99.100:5000/employees

  • For specific Id use the following url http://192.168.99.100:5000/employees/1 --- 1 is the id you wish to search

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published