I'm using a Mongoose assignment done in previous to do this docker assignment.
Install the required dependencies and test it locally.
npm installnpm run devGenerate Docker files using this command.
docker initThis creates Dockerfile, README.DOCKER.md, and compose.yaml for containerization.
Update compose.yaml to include environment variables for MongoDB Atlas, such as MONGO_URI.
Verify that the container runs correctly in Docker Desktop.
docker compose up --watchBuild and start the Docker container.
docker compose up --buildDocker watch command worked locally on my device, but the build process encountered issues that prevented successful build command from happening. Additionally, I was unable to deploy the Docker container to Azure and faced problems with MongoDB connections.