Advertisement

Ubuntu 下,deb 包 安装 docker

阅读量:

目录

    • 查看系统发行代号
    • 下载 deb 包
    • 安装

查看系统发行代号

查看 ubuntu 版本信息

复制代码
    dao@X405UA:~$ lsb_release -a
    No LSB modules are available.
    Distributor ID:	Ubuntu
    Description:	Ubuntu 18.04.1 LTS
    Release:	18.04
    Codename:	bionic
    
    
      
      
      
      
      
      
    
    AI写代码

Ubuntu 18.04.1 LTS 的 代号为 bionic

下载 deb 包

  1. 打开 https://download.docker.com/linux/ubuntu/dists/ ,进入 上述 代号目录。
  2. 进入 pool/stable/,选择机器所属架构(amd64、arm64、armhf、ppc64el、ppc64le、s390x 等),进入下载列表。

安装

复制代码
    dao@X405UA:~$ sudo dpkg -i Downloads/docker-ce_18.06.3_ce_3-0_ubuntu_amd64.deb 
    [sudo] password for dao: 
    Selecting previously unselected package docker-ce.
    (Reading database ... 174022 files and directories currently installed.)
    Preparing to unpack .../docker-ce_18.06.3_ce_3-0_ubuntu_amd64.deb ...
    Unpacking docker-ce (18.06.3~ce~3-0~ubuntu) ...
    Setting up docker-ce (18.06.3~ce~3-0~ubuntu) ...
    Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
    Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
    Processing triggers for ureadahead (0.100.0-20) ...
    ureadahead will be reprofiled on next reboot
    Processing triggers for systemd (237-3ubuntu10.13) ...
    Processing triggers for man-db (2.8.3-2) ...
    
    
      
      
      
      
      
      
      
      
      
      
      
      
      
    
    AI写代码
  • 查看 docker 帮助信息
复制代码
    dao@X405UA:~$ sudo docker help
    
    Usage:	docker [OPTIONS] COMMAND
    
    A self-sufficient runtime for containers
    
    Options:
      --config string      Location of client config files (default "/home/dao/.docker")
      -D, --debug              Enable debug mode
      -H, --host list          Daemon socket(s) to connect to
      -l, --log-level string   Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default "/home/dao/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default "/home/dao/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/home/dao/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote
      -v, --version            Print version information and quit
    
    Management Commands:
      config      Manage Docker configs
      container   Manage containers
      image       Manage images
      network     Manage networks
      node        Manage Swarm nodes
      plugin      Manage plugins
      secret      Manage Docker secrets
      service     Manage services
      stack       Manage Docker stacks
      swarm       Manage Swarm
      system      Manage Docker
      trust       Manage trust on Docker images
      volume      Manage volumes
    
    Commands:
      attach      Attach local standard input, output, and error streams to a running container
      build       Build an image from a Dockerfile
      commit      Create a new image from a container's changes
      cp          Copy files/folders between a container and the local filesystem
      create      Create a new container
      diff        Inspect changes to files or directories on a container's filesystem
      events      Get real time events from the server
      exec        Run a command in a running container
      export      Export a container's filesystem as a tar archive
      history     Show the history of an image
      images      List images
      import      Import the contents from a tarball to create a filesystem image
      info        Display system-wide information
      inspect     Return low-level information on Docker objects
      kill        Kill one or more running containers
      load        Load an image from a tar archive or STDIN
      login       Log in to a Docker registry
      logout      Log out from a Docker registry
      logs        Fetch the logs of a container
      pause       Pause all processes within one or more containers
      port        List port mappings or a specific mapping for the container
      ps          List containers
      pull        Pull an image or a repository from a registry
      push        Push an image or a repository to a registry
      rename      Rename a container
      restart     Restart one or more containers
      rm          Remove one or more containers
      rmi         Remove one or more images
      run         Run a command in a new container
      save        Save one or more images to a tar archive (streamed to STDOUT by default)
      search      Search the Docker Hub for images
      start       Start one or more stopped containers
      stats       Display a live stream of container(s) resource usage statistics
      stop        Stop one or more running containers
      tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
      top         Display the running processes of a container
      unpause     Unpause all processes within one or more containers
      update      Update configuration of one or more containers
      version     Show the Docker version information
      wait        Block until one or more containers stop, then print their exit codes
    
    Run 'docker COMMAND --help' for more information on a command.
    
    
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
    
    AI写代码
  • 查看 docker 版本
复制代码
    dao@X405UA:~$ sudo docker version
    [sudo] password for dao: 
    Client:
     Version:           18.06.3-ce
     API version:       1.38
     Go version:        go1.10.3
     Git commit:        d7080c1
     Built:             Wed Feb 20 02:28:10 2019
     OS/Arch:           linux/amd64
     Experimental:      false
    
    Server:
     Engine:
      Version:          18.06.3-ce
      API version:      1.38 (minimum version 1.12)
      Go version:       go1.10.3
      Git commit:       d7080c1
      Built:            Wed Feb 20 02:26:34 2019
      OS/Arch:          linux/amd64
      Experimental:     false
    
    
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
    
    AI写代码
  • 查看 docker 信息
复制代码
    dao@X405UA:~$ sudo docker info
    Containers: 0
     Running: 0
     Paused: 0
     Stopped: 0
    Images: 0
    Server Version: 18.06.3-ce
    Storage Driver: overlay2
     Backing Filesystem: extfs
     Supports d_type: true
     Native Overlay Diff: true
    Logging Driver: json-file
    Cgroup Driver: cgroupfs
    Plugins:
     Volume: local
     Network: bridge host macvlan null overlay
     Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
    Swarm: inactive
    Runtimes: runc
    Default Runtime: runc
    Init Binary: docker-init
    containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
    runc version: a592beb5bc4c4092b1b1bac971afed27687340c5
    init version: fec3683
    Security Options:
     apparmor
     seccomp
      Profile: default
    Kernel Version: 4.15.0-46-generic
    Operating System: Ubuntu 18.04.1 LTS
    OSType: linux
    Architecture: x86_64
    CPUs: 4
    Total Memory: 15.55GiB
    Name: X405UA
    ID: EGYD:LFFV:LW3J:D5Y7:4OEA:NWOA:QWJP:XGPF:R3D6:XJHD:63W2:PWO6
    Docker Root Dir: /var/lib/docker
    Debug Mode (client): false
    Debug Mode (server): false
    Registry: https://index.docker.io/v1/
    Labels:
    Experimental: false
    Insecure Registries:
     127.0.0.0/8
    Live Restore Enabled: false
    
    WARNING: No swap limit support
    
    
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
    
    AI写代码

参考链接
<>
<>
<>
<>
https://docs.docker.com/install/linux/docker-ce/ubuntu/

全部评论 (0)

还没有任何评论哟~