Docker preliminary 2-installation under Linux

http://archive.ubuntu.com/ubuntuwily

Install Docker

  • Docker version
    Docker is divided into CE (Community Edition) and EE (Enterprise Edition) from the 17.03 version.
    Docker EE is supported by the company, can be used in certified operating systems and cloud providers, and can run certified containers and plug-ins from the Docker Store.
    Docker CE is the new name of the free Docker product. Docker CE includes a complete Docker platform, which is very suitable for developers and operation and maintenance teams to build container apps. -For personal use, choose Docker CE version
  • View Linux version

    # cat /etc/issue
    Ubuntu 16.04.1 LTS \n \l

  • Update system package list
    # apt-get update
  • Install Docker-1
    is to execute the installed shell script at https://get.docker.com, read the prompt information carefully.
# wget -qO- https://get.docker.com/ | sh
# Executing docker install script, commit: 442e66405c304fa92af8aadaa1d9b31bf4b0ad94
Warning: the "docker" command appears to already exist on this system.

If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.

If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.

You may press Ctrl+C now to abort this script.
+ sleep 20
  • Install Docker-2
# sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common  -- 添加GPG密钥,使用Docker仓库repository

# sudo apt-get install -y docker-ce -- 安装Docker CE


  • Confirm Docker installation
# docker --version

# docker system info
Client:
 Debug Mode: false

Server:
 Containers: 2
  Running: 0
  Paused: 0
  Stopped: 2
 Images: 1
 Server Version: 19.03.7
 Storage Driver: overlay2
  Backing Filesystem: <unknown>
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 4.4.0-83-generic
 Operating System: Ubuntu 16.04.1 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 3.762GiB
 Name: *****
 ID: WWVL:3LIB:ZZTF:PNUS:K4MU:JMCP:ZX43:OWYO:ATVG:YVSU:WLWW:MIYC
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: *****
 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
  • Start Docker and check containers and services
    systemctl start docker
    systemctl restart docker
    systemctl stop docker
  • Select memory
  • Device Mapper configuration

Linux command basics

  • Switch user: su (switch to root user by default) / sudo (you can skip root to execute commands)
  • View linux version: uname -a # show system information
                             cat / etc / issue
                             cat / proc / version
                             cat / proc / cpuinfo
                             getconf LONG_BIT # system bits 32 bit / 64 bit     
  • Process
               ps -a # show all processes
               sudo kill -9 process number process number # abort process
               sudo kill sigkill process number # abort process
  • Delete the file: rm -rf # If you cannot control or gain control of the file, you can also delete the file in addition to releasing permissions
                                                # unable to lock the administration directory
  • Application
               installation: sudo apt-get update Application name
               update: sudo apt-get install -y application name
  • Network
               netstat ###### Display network links, routing tables, network statistics, pseudo links, transfer nodes
               netstat -s # statistics
               netstat -ant # all / numeric / tcp
               netstat -tulpn # tcp / udp / listening / program / numeric
               ss ###### Output socket statistics, you can display more TCP and stat information
               ss -s # summary
               ss -u-t -a # udp / tcp / all
               ss -l # listening   
               lsof ###### Display information about files opened by the current system
               tcptrack # Network monitoring tool
               iftop # Traffic monitoring
               ifconfig # network situation
  • Help
               Help
               man
        
Published 243 original articles · Like 32 · Visits 210,000+

Guess you like

Origin blog.csdn.net/u012841352/article/details/105180993