centos7.2 64位 安装最新版 docker-ce-18.05.0

前端之家收集整理的这篇文章主要介绍了centos7.2 64位 安装最新版 docker-ce-18.05.0前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

[root@Nginx01 ~]# uname -r
3.10.0-514.el7.x86_64

[root@Nginx01 ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

[root@Nginx01 ~]# curl -sSL https://get.docker.com/ | sh

#Executing docker install script,commit: 36b78b2

  • sh -c 'yum install -y -q yum-utils'
  • sh -c 'yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo'
    Loaded plugins: fastestmirror
    adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
    grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
    repo saved to /etc/yum.repos.d/docker-ce.repo
  • '[' edge '!=' stable ']'
  • sh -c 'yum-config-manager --enable docker-ce-edge'
    Loaded plugins: fastestmirror
    ============================= repo: docker-ce-edge =============================
    [docker-ce-edge]
    async = True
    bandwidth = 0
    base_persistdir = /var/lib/yum/repos/x86_64/7
    baseurl = https://download.docker.com/linux/centos/7/x86_64/edge
    cache = 0
    cachedir = /var/cache/yum/x86_64/7/docker-ce-edge
    check_config_file_age = True
    compare_providers_priority = 80
    cost = 1000
    deltarpm_Metadata_percentage = 100
    deltarpm_percentage =
    enabled = 1
    enablegroups = True
    exclude =
    failovermethod = priority
    ftp_disable_epsv = False
    gpgcadir = /var/lib/yum/repos/x86_64/7/docker-ce-edge/gpgcadir
    gpgcakey =
    gpgcheck = True
    gpgdir = /var/lib/yum/repos/x86_64/7/docker-ce-edge/gpgdir
    gpgkey = https://download.docker.com/linux/centos/gpg
    hdrdir = /var/cache/yum/x86_64/7/docker-ce-edge/headers
    http_caching = all
    includepkgs =
    ip_resolve =
    keepalive = True
    keepcache = False
    mddownloadpolicy = sqlite
    mdpolicy = group:small
    mediaid =
    Metadata_expire = 21600
    Metadata_expire_filter = read-only:present
    Metalink =
    minrate = 0
    mirrorlist =
    mirrorlist_expire = 86400
    name = Docker CE Edge - x86_64
    old_base_cache_dir =
    password =
    persistdir = /var/lib/yum/repos/x86_64/7/docker-ce-edge
    pkgdir = /var/cache/yum/x86_64/7/docker-ce-edge/packages
    proxy = False
    proxy_dict =
    proxy_password =
    proxy_username =
    repo_gpgcheck = False
    retries = 10
    skip_if_unavailable = False
    ssl_check_cert_permissions = True
    sslcacert =
    sslclientcert =
    sslclientkey =
    sslverify = True
    throttle = 0
    timeout = 30.0
    ui_id = docker-ce-edge/x86_64
    ui_repoid_vars = releasever,
    basearch
    username =

  • sh -c 'yum makecache'
    Loaded plugins: fastestmirror
    base | 3.6 kB 00:00
    docker-ce-edge | 2.9 kB 00:00
    docker-ce-stable | 2.9 kB 00:00
    extras | 3.4 kB 00:00
    updates | 3.4 kB 00:00
    (1/14): docker-ce-edge/x86_64/primary_db | 17 kB 00:01
    (2/14): docker-ce-edge/x86_64/filelists_db | 9.6 kB 00:01
    (3/14): docker-ce-stable/x86_64/primary_db | 13 kB 00:00
    (4/14): docker-ce-edge/x86_64/other_db | 62 kB 00:00
    (5/14): docker-ce-stable/x86_64/other_db | 66 kB 00:00
    (6/14): docker-ce-stable/x86_64/filelists_db | 7.7 kB 00:01
    (7/14): extras/7/x86_64/prestodelta | 47 kB 00:00
    (8/14): extras/7/x86_64/other_db | 91 kB 00:01
    (9/14): extras/7/x86_64/filelists_db | 517 kB 00:03
    (10/14): updates/7/x86_64/filelists_db | 875 kB 00:03
    (11/14): updates/7/x86_64/other_db | 201 kB 00:02
    (12/14): updates/7/x86_64/prestodelta | 180 kB 00:02
    (13/14): base/7/x86_64/other_db | 2.5 MB 00:08
    (14/14): base/7/x86_64/filelists_db | 6.9 MB 00:13
    Loading mirror speeds from cached hostfile
    • base: mirrors.nju.edu.cn
    • extras: mirrors.nju.edu.cn
    • updates: ftp.sjtu.edu.cn
      Metadata Cache Created
  • sh -c 'yum install -y -q docker-ce'
    Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
    warning: /var/cache/yum/x86_64/7/docker-ce-edge/packages/docker-ce-18.05.0.ce-3.el7.centos.x86_64.rpm: Header V4 RSA/SHA512 Signature,key ID 621e9f35: NOKEY
    Public key for docker-ce-18.05.0.ce-3.el7.centos.x86_64.rpm is not installed
    Importing GPG key 0x621E9F35:
    Userid : "Docker Release (CE rpm) <docker@docker.com>"
    Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
    From : https://download.docker.com/linux/centos/gpg
    setsebool: SELinux is disabled.
    If you would like to use Docker as a non-root user,you should now consider
    adding your user to the "docker" group with something like:

    sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
containers which can be used to obtain root privileges on the
docker host.
Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
for more information.

[root@Nginx01 ~]# sestatus
SELinux status: disabled

[root@Nginx01 ~]# docker -v
Docker version 18.05.0-ce,build f150324
[root@Nginx01 ~]#

[root@Nginx01 ~]# rpm -ql docker-ce-18.05.0.ce-3.el7.centos.x86_64
/etc/udev/rules.d/80-docker.rules
/usr/bin/docker
/usr/bin/docker-containerd
/usr/bin/docker-containerd-ctr
/usr/bin/docker-containerd-shim
/usr/bin/docker-init
/usr/bin/docker-proxy
/usr/bin/docker-runc
/usr/bin/dockerd
/usr/lib/systemd/system/docker.service
/usr/share/bash-completion/completions/docker
/usr/share/doc/docker-ce-18.05.0.ce
/usr/share/doc/docker-ce-18.05.0.ce/cli-LICENSE
/usr/share/doc/docker-ce-18.05.0.ce/cli-MAINTAINERS
/usr/share/doc/docker-ce-18.05.0.ce/cli-NOTICE
/usr/share/doc/docker-ce-18.05.0.ce/cli-README.md
/usr/share/doc/docker-ce-18.05.0.ce/engine-AUTHORS
/usr/share/doc/docker-ce-18.05.0.ce/engine-CHANGELOG.md
/usr/share/doc/docker-ce-18.05.0.ce/engine-CONTRIBUTING.md
/usr/share/doc/docker-ce-18.05.0.ce/engine-LICENSE
/usr/share/doc/docker-ce-18.05.0.ce/engine-MAINTAINERS
/usr/share/doc/docker-ce-18.05.0.ce/engine-NOTICE
/usr/share/doc/docker-ce-18.05.0.ce/engine-README.md
/usr/share/fish/vendor_completions.d/docker.fish
/usr/share/man/man1/docker-attach.1.gz
/usr/share/man/man1/docker-build.1.gz
/usr/share/man/man1/docker-checkpoint-create.1.gz
/usr/share/man/man1/docker-checkpoint-ls.1.gz
/usr/share/man/man1/docker-checkpoint-rm.1.gz
/usr/share/man/man1/docker-checkpoint.1.gz
/usr/share/man/man1/docker-commit.1.gz
/usr/share/man/man1/docker-config-create.1.gz
/usr/share/man/man1/docker-config-inspect.1.gz
/usr/share/man/man1/docker-config-ls.1.gz
/usr/share/man/man1/docker-config-rm.1.gz
/usr/share/man/man1/docker-config.1.gz
/usr/share/man/man1/docker-container-attach.1.gz
/usr/share/man/man1/docker-container-commit.1.gz
/usr/share/man/man1/docker-container-cp.1.gz
/usr/share/man/man1/docker-container-create.1.gz
/usr/share/man/man1/docker-container-diff.1.gz
/usr/share/man/man1/docker-container-exec.1.gz
/usr/share/man/man1/docker-container-export.1.gz
/usr/share/man/man1/docker-container-inspect.1.gz
/usr/share/man/man1/docker-container-kill.1.gz
/usr/share/man/man1/docker-container-logs.1.gz
/usr/share/man/man1/docker-container-ls.1.gz
/usr/share/man/man1/docker-container-pause.1.gz
/usr/share/man/man1/docker-container-port.1.gz
/usr/share/man/man1/docker-container-prune.1.gz
/usr/share/man/man1/docker-container-rename.1.gz
/usr/share/man/man1/docker-container-restart.1.gz
/usr/share/man/man1/docker-container-rm.1.gz
/usr/share/man/man1/docker-container-run.1.gz
/usr/share/man/man1/docker-container-start.1.gz
/usr/share/man/man1/docker-container-stats.1.gz
/usr/share/man/man1/docker-container-stop.1.gz
/usr/share/man/man1/docker-container-top.1.gz
/usr/share/man/man1/docker-container-unpause.1.gz
/usr/share/man/man1/docker-container-update.1.gz
/usr/share/man/man1/docker-container-wait.1.gz
/usr/share/man/man1/docker-container.1.gz
/usr/share/man/man1/docker-cp.1.gz
/usr/share/man/man1/docker-create.1.gz
/usr/share/man/man1/docker-deploy.1.gz
/usr/share/man/man1/docker-diff.1.gz
/usr/share/man/man1/docker-events.1.gz
/usr/share/man/man1/docker-exec.1.gz
/usr/share/man/man1/docker-export.1.gz
/usr/share/man/man1/docker-history.1.gz
/usr/share/man/man1/docker-image-build.1.gz
/usr/share/man/man1/docker-image-history.1.gz
/usr/share/man/man1/docker-image-import.1.gz
/usr/share/man/man1/docker-image-inspect.1.gz
/usr/share/man/man1/docker-image-load.1.gz
/usr/share/man/man1/docker-image-ls.1.gz
/usr/share/man/man1/docker-image-prune.1.gz
/usr/share/man/man1/docker-image-pull.1.gz
/usr/share/man/man1/docker-image-push.1.gz
/usr/share/man/man1/docker-image-rm.1.gz
/usr/share/man/man1/docker-image-save.1.gz
/usr/share/man/man1/docker-image-tag.1.gz
/usr/share/man/man1/docker-image.1.gz
/usr/share/man/man1/docker-images.1.gz
/usr/share/man/man1/docker-import.1.gz
/usr/share/man/man1/docker-info.1.gz
/usr/share/man/man1/docker-inspect.1.gz
/usr/share/man/man1/docker-kill.1.gz
/usr/share/man/man1/docker-load.1.gz
/usr/share/man/man1/docker-login.1.gz
/usr/share/man/man1/docker-logout.1.gz
/usr/share/man/man1/docker-logs.1.gz
/usr/share/man/man1/docker-manifest-annotate.1.gz
/usr/share/man/man1/docker-manifest-create.1.gz
/usr/share/man/man1/docker-manifest-inspect.1.gz
/usr/share/man/man1/docker-manifest-push.1.gz
/usr/share/man/man1/docker-manifest.1.gz
/usr/share/man/man1/docker-network-connect.1.gz
/usr/share/man/man1/docker-network-create.1.gz
/usr/share/man/man1/docker-network-disconnect.1.gz
/usr/share/man/man1/docker-network-inspect.1.gz
/usr/share/man/man1/docker-network-ls.1.gz
/usr/share/man/man1/docker-network-prune.1.gz
/usr/share/man/man1/docker-network-rm.1.gz
/usr/share/man/man1/docker-network.1.gz
/usr/share/man/man1/docker-node-demote.1.gz
/usr/share/man/man1/docker-node-inspect.1.gz
/usr/share/man/man1/docker-node-ls.1.gz
/usr/share/man/man1/docker-node-promote.1.gz
/usr/share/man/man1/docker-node-ps.1.gz
/usr/share/man/man1/docker-node-rm.1.gz
/usr/share/man/man1/docker-node-update.1.gz
/usr/share/man/man1/docker-node.1.gz
/usr/share/man/man1/docker-pause.1.gz
/usr/share/man/man1/docker-plugin-create.1.gz
/usr/share/man/man1/docker-plugin-disable.1.gz
/usr/share/man/man1/docker-plugin-enable.1.gz
/usr/share/man/man1/docker-plugin-inspect.1.gz
/usr/share/man/man1/docker-plugin-install.1.gz
/usr/share/man/man1/docker-plugin-ls.1.gz
/usr/share/man/man1/docker-plugin-push.1.gz
/usr/share/man/man1/docker-plugin-rm.1.gz
/usr/share/man/man1/docker-plugin-set.1.gz
/usr/share/man/man1/docker-plugin-upgrade.1.gz
/usr/share/man/man1/docker-plugin.1.gz
/usr/share/man/man1/docker-port.1.gz
/usr/share/man/man1/docker-ps.1.gz
/usr/share/man/man1/docker-pull.1.gz
/usr/share/man/man1/docker-push.1.gz
/usr/share/man/man1/docker-rename.1.gz
/usr/share/man/man1/docker-restart.1.gz
/usr/share/man/man1/docker-rm.1.gz
/usr/share/man/man1/docker-rmi.1.gz
/usr/share/man/man1/docker-run.1.gz
/usr/share/man/man1/docker-save.1.gz
/usr/share/man/man1/docker-search.1.gz
/usr/share/man/man1/docker-secret-create.1.gz
/usr/share/man/man1/docker-secret-inspect.1.gz
/usr/share/man/man1/docker-secret-ls.1.gz
/usr/share/man/man1/docker-secret-rm.1.gz
/usr/share/man/man1/docker-secret.1.gz
/usr/share/man/man1/docker-service-create.1.gz
/usr/share/man/man1/docker-service-inspect.1.gz
/usr/share/man/man1/docker-service-logs.1.gz
/usr/share/man/man1/docker-service-ls.1.gz
/usr/share/man/man1/docker-service-ps.1.gz
/usr/share/man/man1/docker-service-rm.1.gz
/usr/share/man/man1/docker-service-rollback.1.gz
/usr/share/man/man1/docker-service-scale.1.gz
/usr/share/man/man1/docker-service-update.1.gz
/usr/share/man/man1/docker-service.1.gz
/usr/share/man/man1/docker-stack-deploy.1.gz
/usr/share/man/man1/docker-stack-ls.1.gz
/usr/share/man/man1/docker-stack-ps.1.gz
/usr/share/man/man1/docker-stack-rm.1.gz
/usr/share/man/man1/docker-stack-services.1.gz
/usr/share/man/man1/docker-stack.1.gz
/usr/share/man/man1/docker-start.1.gz
/usr/share/man/man1/docker-stats.1.gz
/usr/share/man/man1/docker-stop.1.gz
/usr/share/man/man1/docker-swarm-ca.1.gz
/usr/share/man/man1/docker-swarm-init.1.gz
/usr/share/man/man1/docker-swarm-join-token.1.gz
/usr/share/man/man1/docker-swarm-join.1.gz
/usr/share/man/man1/docker-swarm-leave.1.gz
/usr/share/man/man1/docker-swarm-unlock-key.1.gz
/usr/share/man/man1/docker-swarm-unlock.1.gz
/usr/share/man/man1/docker-swarm-update.1.gz
/usr/share/man/man1/docker-swarm.1.gz
/usr/share/man/man1/docker-system-df.1.gz
/usr/share/man/man1/docker-system-events.1.gz
/usr/share/man/man1/docker-system-info.1.gz
/usr/share/man/man1/docker-system-prune.1.gz
/usr/share/man/man1/docker-system.1.gz
/usr/share/man/man1/docker-tag.1.gz
/usr/share/man/man1/docker-top.1.gz
/usr/share/man/man1/docker-trust-inspect.1.gz
/usr/share/man/man1/docker-trust-key-generate.1.gz
/usr/share/man/man1/docker-trust-key-load.1.gz
/usr/share/man/man1/docker-trust-key.1.gz
/usr/share/man/man1/docker-trust-revoke.1.gz
/usr/share/man/man1/docker-trust-sign.1.gz
/usr/share/man/man1/docker-trust-signer-add.1.gz
/usr/share/man/man1/docker-trust-signer-remove.1.gz
/usr/share/man/man1/docker-trust-signer.1.gz
/usr/share/man/man1/docker-trust.1.gz
/usr/share/man/man1/docker-unpause.1.gz
/usr/share/man/man1/docker-update.1.gz
/usr/share/man/man1/docker-version.1.gz
/usr/share/man/man1/docker-volume-create.1.gz
/usr/share/man/man1/docker-volume-inspect.1.gz
/usr/share/man/man1/docker-volume-ls.1.gz
/usr/share/man/man1/docker-volume-prune.1.gz
/usr/share/man/man1/docker-volume-rm.1.gz
/usr/share/man/man1/docker-volume.1.gz
/usr/share/man/man1/docker-wait.1.gz
/usr/share/man/man1/docker.1.gz
/usr/share/man/man5/Dockerfile.5.gz
/usr/share/man/man5/docker-config-json.5.gz
/usr/share/man/man8/dockerd.8.gz
/usr/share/nano/Dockerfile.nanorc
/usr/share/vim/vimfiles/doc/dockerfile.txt
/usr/share/vim/vimfiles/ftdetect/dockerfile.vim
/usr/share/vim/vimfiles/Syntax/dockerfile.vim
/usr/share/zsh/vendor-completions/_docker
[root@Nginx01 ~]#

远程访问另外一台服务器上的docker

[root@Nginx01 ~]# docker -H 192.168.2.191 info
Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 2
Server Version: 18.03.1-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: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-116-generic
Operating System: Ubuntu 16.04.4 LTS
OSType: linux
Architecture: x86_64
cpus: 1
Total Memory: 983.3MiB
Name: docker01
ID: DQ7N:MVH5:3JHZ:ECNO:O5DG:C25Y:5DSH:TNK5:QCUA:PYXQ:X3QZ:LO33
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
Registry Mirrors:
http://13d34739.m.daocloud.io/
Live Restore Enabled: false

WARNING: No swap limit support[root@Nginx01 ~]#

原文链接:https://www.f2er.com/centos/374303.html

猜你在找的CentOS相关文章