Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 839 Bytes

File metadata and controls

34 lines (22 loc) · 839 Bytes

Dockerizing and Running the Application

Prerequisites

  • Docker installed on your machine.
  • Docker CLI
  1. Build the Docker Image
    Open a terminal and navigate to the project directory. Run the following command to build the Docker image:
docker build -t myapp:latest .
  1. Run the Docker Container
    After building the image, run the container using the following command:
docker run -d -p 5000:5000 --name myapp_container myapp:latest

This command will start the container in detached mode and map port 5000 of the container to port 5000 on your host machine.

  1. Access the Application
    Open your web browser and navigate to http://localhost:5000 to access the application.

  2. Stopping the Application
    Docker CLI: To stop the container, run:

docker stop myapp_container