Git Product home page Git Product logo

container_training's Introduction

docker基础

配置后重启

systemctl daemon-reload   
   
systemctl restart docker  

安装docker

手动安装

yum直接联网安装



参考:https://docs.docker.com/install/linux/docker-ce/centos/



yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2

yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

yum install docker-ce
     
     
systemctl start docker
     

离线下载安装包安装

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

自动化安装

docker安装官方脚本

curl -fsSL get.docker.com -o get-docker.sh

sh get-docker.sh

第三方脚本

curl https://releases.rancher.com/install-docker/17.03.sh | sh

安装指定版本

下载指定版本安装包并安装

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

yum安装执行版本的docker

配置docker

配置国内加速

vim /usr/lib/systemd/system/docker.service

add:

--registry-mirrors=https://registry.docker-cn.com


systemctl daemon-reload    &&  systemctl restart docker

systemctl daemon-reload    &&  systemctl restart docker


配置开机启动

systemctl start docker &&  systemctl  enable docker 

局域网内部的安装方法

方法一:

cd /etc/yum.repo

wget  https://download.docker.com/linux/centos/docker-ce.repo

yum install docker-ce

简单方法:


wget -P /etc/yum.repos.d     https://download.docker.com/linux/centos/docker-ce.repo
ls -l /etc/yum.repos.d

yum install docker-ce

方法二:

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

wget   https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-18.03.1.ce-1.el7.centos.x86_64.rpm

yum localinstall  docker-ce-18.03.1.ce-1.el7.centos.x86_64.rpm

Test

RUN

docker run -d  abc

EXEC

docker exec -it  xxx  /bin/bash

container_training's People

Contributors

latermonk avatar sproutman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.