docker run --rm -it -p 49853:80/tcp
-e GEO_API_URL='http://localhost:40051/' 1b37dbb57268
Run in 2 different ports
Run Cocker with Port
docker run --rm -it -p 49854:443/tcp -p 49853:80/tcp 1b37dbb57268
Run MongoDB
// Run Mongo DB Container with Volume Attached
docker run -d -p 27017:27017 --name mongo-db-container
-v C:/Data/MongoDb-Data:/data/db -d mongo:latest
Run SQL Server
// Run SQL Server with SA, Password
docker run --name SQLServer2022
-e "ACCEPT_EULA=Y"
-e "MSSQL_SA_PASSWORD=System@1984"
-p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest
Many times TCP Wont work, because of certificate issue.
Remove Actions
To remove Image/Container
Remove Image
docker image prune --filter="dangling=true"
Remove Image
docker image rm b01823902874
Remove Image by Force
docker image rm b01823902874 -f
Remove Container
docker container prune //Remove all unused containers
Container Actions
Start Container
// Starts the existing container
docker container start mongo-db-container
Save as '.tat'
//Extract Docker image and save it as '.tar' file.
docker save --output busybox.tar 3ca38f187e93
Inspect
// Inspect the running container
docker inspect 'container-id'