DockerMain - aleksei-khitev/knowledge_base GitHub Wiki
Основная информация и базовые команды
Версия docker
Короткая версия
~$ docker --version
Docker version 20.10.2, build 20.10.2-0ubuntu2
Подробная версия
~$ docker version
Client:
Version: 20.10.2
API version: 1.41
Go version: go1.13.8
Git commit: 20.10.2-0ubuntu2
Built: Tue Mar 2 05:51:34 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version: dial unix /var/run/docker.sock: connect: permission denied
aleksei_khitev@aleksei-PC:~$ docker --version
Docker version 20.10.2, build 20.10.2-0ubuntu2
aleksei_khitev@aleksei-PC:~$ sudo docker --version
Docker version 20.10.2, build 20.10.2-0ubuntu2
aleksei_khitev@aleksei-PC:~$ sudo docker version
Client:
Version: 20.10.2
API version: 1.41
...
Server:
Engine:
Version: 20.10.2
API version: 1.41 (minimum version 1.12)
...
runc:
Version: 1.0.0~rc95-0ubuntu1~21.04.1
GitCommit:
docker-init:
Version: 0.19.0
GitCommit:
Курс Docker for Java Developers
Информация о докере
~$ sudo docker info
[sudo] пароль для aleksei_khitev:
Client:
Context: default
Debug Mode: false
Server:
Containers: 5
Running: 0
Paused: 0
Stopped: 5
Images: 189
Server Version: 20.10.2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
...
Приведена информация о контенерах, образах, дисках, swam-е и прочем Курс Docker for Java Developers
Список команд докера
~$ docker --help
Usage: docker [OPTIONS] COMMAND
A self-sufficient runtime for containers
Options:
--config string Location of client config files (default
"/home/aleksei_khitev/.docker")
-c, --context string Name of the context to use to connect to the
daemon (overrides DOCKER_HOST env var and
default context set with "docker context use")
-D, --debug Enable debug mode
...
Курс Docker for Java Developers
Справка по команде
~$ docker image --help
Usage: docker image COMMAND
Manage images
Commands:
build Build an image from a Dockerfile
history Show the history of an image
import Import the contents from a tarball to create a filesystem image
inspect Display detailed information on one or more images
load Load an image from a tar archive or STDIN
ls List images
prune Remove unused images
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rm Remove one or more images
save Save one or more images to a tar archive (streamed to STDOUT by default)
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
Run 'docker image COMMAND --help' for more information on a command.