docker pull image
Example:
docker pull mysql
docker ps
docker run --name nameWeGiveIt -d -it -p 80:80 image
-d: detached, as in server
-it: interactive+tty. Without this commands like docker inspect won‘t be able to display anything to you.
-p a:b Publish container port b as port a (or ip:port) on the host.
Examples:
docker run --name mysql -d -it -p 8888:80 mysql
docker exec -it <id> /bin/bash
...or if bash is not installed, the default shell:
docker exec -it <id> /bin/sh
docker cp foo.txt mycontainer:/foo.txt
docker cp mycontainer:/foo.txt foo.txt
docker inspect
docker stop container
Container can be restarted, process is stopped, file system changes are preserved.
docker start container
Starts a previously stopped container.
docker rm container
Stops and removes a container, file system and all. Image is preserved.
docker pause container
Freezes all activity, only possible for Hyper-V containers.
docker inspect --format="{{.Id}}" container
Enter-PSSession containerId -RunAsAdministrator
docker build -t myRepo/myContainer:myVersion .