Sunday, 7 May 2023

Docker - How to build image, run it and push it


how to build docker image
docker build -t passwordapi .

how to run docker image, set environment variable and expose port
docker run --name passwordapi -e ConnectionString="mongodb://localhost:27017"  -p 13734:80 passwordapi

how to push image to dockerhub
docker tag passwordapi:latest nageshajab/passwordapi
docker push nageshajab/passwordapi

No comments:

Post a Comment

Search This Blog

Creating your first "Alexa" Skill

Index What is Alexa What is Alexa Skill? Why is it required when Alexa already equipped with voice assistant? Dev...