-
To get the ip address of the container
docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" [Container Name]
-
To build application for docker file within the code path
docker build -t [Application image name] .
-
Run an image into container by assigning port and container name
docker run -d -p 80:80 --name [container name] [image name]
-
To stop running container
docker stop [container Name]
-
To remove container from host
docker rm [container name]
-
To remove image
docker rmi [container Name]
-
To Install Docker on windows server 2016, Run below commands in powershell to install docker on windows server
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Install-Package -Name docker -ProviderName DockerMsftProvider -Force
Restart-Computer –Force
-
To check the docker version running in the system
docker version
-
To check whether docker is running in the system
Get-Service docker
-
To start docker in the system
Start-Service docker
-
To install chocolatey
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
**I will add more commands here as I explore.