docker学习笔记001-docker 安装方法介绍

简介: docker安装笔记001-

docker Setup

docker推荐使用version 1.13或者更高版本

docker 包含社区版和企业版 Community Edition (CE) and Enterprise Edition (EE).

支持多种平台

DeskTop:Mac、Windows

Cloud:Amazon 、Microsoft

Server:CentOs、OracleLinux、Ubuntu、Debian、Red Hat Enterprise Linux


安装docker CE

启动一个docker CE,需要确认前置要求,再执行安装操作。EE版本是收费版本不做介绍

前置要求

OS要求、老版本要求:docker docker-engine查看

安装

 1.Docker’s repositories安装

  1. Install required packages. yum-utils provides the yum-config-manager utility, and device-mapper-persistent-data and lvm2 are required by the devicemapper storage driver.

    $ sudo yum install -y yum-utils \
      device-mapper-persistent-data \
      lvm2
    
  2. Use the following command to set up the stable repository. You always need the stable repository, even if you want to install builds from the edge or test repositories as well.

    $ sudo yum-config-manager \
        --add-repo \
        https://download.docker.com/linux/centos/docker-ce.repo
    
  3. Optional: Enable the edge and test repositories. These repositories are included in the docker.repo file above but are disabled by default. You can enable them alongside the stable repository.

    $ sudo yum-config-manager --enable docker-ce-edge
    
    $ sudo yum-config-manager --enable docker-ce-test
    

    You can disable the edge or test repository by running the yum-config-manager command with the --disableflag. To re-enable it, use the --enable flag. The following command disables the edge repository.

    $ sudo yum-config-manager --disable docker-ce-edge



Install the latest version of Docker CE, or go to the next step to install a specific version.

$ sudo yum install docker-ce
  1. Start Docker.

    $ sudo systemctl start docker
    
  2. Verify that docker is installed correctly by running the hello-world image.

    $ sudo docker run hello-world


2.下载rpm,手动安装


从这下载

https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ 

Install Docker CE, changing the path below to the path where you downloaded the Docker package.

$ sudo yum install /path/to/package.rpm

3.scripts脚本自动安装


4.卸载

  1. Uninstall the Docker package:

    $ sudo yum remove docker-ce
    
  2. Images, containers, volumes, or customized configuration files on your host are not automatically removed. To delete all images, containers, and volumes:

    $ sudo rm -rf /var/lib/docker
    

You must delete any edited configuration files manually.













目录
相关文章
|
3天前
|
网络协议 Linux Docker
在centos7下通过docker 安装onlyoffice
在centos7下通过docker 安装onlyoffice
14 0
|
2天前
|
Kubernetes Docker 容器
Docker 安装 Portainer
Portainer Community Edition是一个针对容器化应用程序的轻量级服务交付平台,可用于管理 Docker、Swarm、Kubernetes 和 ACI 环境。它的设计理念是部署和使用都简单,该应用程序允许您通过“智能”GUI 和/或广泛的 API 管理所有编排器资源。
29 3
|
2天前
|
前端开发 jenkins 持续交付
新的centos7.9安装docker版本的jenkins2.436.1最新版本-前端项目发布(五)
新的centos7.9安装docker版本的jenkins2.436.1最新版本-前端项目发布(五)
13 1
|
2天前
|
jenkins 网络安全 持续交付
新的centos7.9安装docker版本的jenkins2.436.1最新版本-后端项目发布(四)
新的centos7.9安装docker版本的jenkins2.436.1最新版本-后端项目发布(四)
|
2天前
|
Java 开发工具 git
新的centos7.9安装docker版本的jenkins2.436.1最新版本-项目发布(三)
新的centos7.9安装docker版本的jenkins2.436.1最新版本-项目发布(三)
10 4
|
2天前
|
网络安全 Docker 容器
测试开发环境下centos7.9下安装docker的minio
测试开发环境下centos7.9下安装docker的minio
|
3天前
|
NoSQL Redis Docker
Mac上轻松几步搞定Docker与Redis安装:从下载安装到容器运行实测全程指南
Mac上轻松几步搞定Docker与Redis安装:从下载安装到容器运行实测全程指南
14 0
|
3天前
|
安全 Linux 网络安全
安装docker
安装docker
24 0
|
3天前
|
Shell 数据安全/隐私保护 Docker
docker安装anaconda3 python环境
docker安装anaconda3 python环境
10 0
|
3天前
|
NoSQL Linux Redis
本地虚拟机centos7通过docker安装主从redis3.2
本地虚拟机centos7通过docker安装主从redis3.2
10 0