- Docker installed on your machine.
- Docker CLI
- 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 .- 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:latestThis command will start the container in detached mode and map port 5000 of the container to port 5000 on your host machine.
Access the Application
Open your web browser and navigate tohttp://localhost:5000to access the application.Stopping the Application
Docker CLI: To stop the container, run:
docker stop myapp_container