Try the docker for the first time
- 2019-11-9
- docker
docker login
Log in to a Docker registry. If no server is specified, the default is defined by the daemon.
-p, --password string
Password
-u, --username string
Username
Example 1
docker login -u lolimay
docker build
build an image from a Dockerfile
-t, --tag list
Name and optionally a tag in the 'name:tag' format. If the tag
is not specified, use latest
by default.
Example 1
docker build -t lolimay/cheers2019:test .
docker run
Run a command in a new container
-i, --interactive
Keep STDIN open even if not attached
-t, --tty
Allocate a pseudo-TTY
--rm
Automatically remove the container when it exits
Example 1
docker run -it --rm lolimay/cheers2019:test
docker push
Push an image or a repository to a registry
Example 1
docker push lolimay/cheers2019