Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ To install and use Docker under linux     - Android to determine whether the device to open WIFI, GPRS data connection (Programming)

- MongoDB simple replication configuration (Database)

- Linux Systems Getting Started Learning: Configuration PCI passthrough on a virtual machine (Linux)

- The Java development environment to build under Ubuntu 14.04 (Linux)

- Configuration based on open source Lucene Java development environment (Server)

- Zabbix configure DataGuard monitoring (Database)

- Experience PHP 7.0 on CentOS 7.x / Fedora 21 (Server)

- MySQL and Oracle time zone settings compare (Database)

- Sleuth Kit: used to analyze a disk image and restore files open source forensics tools (Linux)

- Manually compile Hadoop 2.6.0 under Ubuntu 14.04 (Server)

- Installation and Configuration rsync server under CentOS 6.3 (Server)

- CentOS 7 virt-manager can not connect a local hypervisor (Linux)

- MySQL Data Types (Database)

- Export error: ORA-04063: package body dmsys dbms dm model exp has error (Database)

- CentOS network configuration 7, and set the host name and IP-bound problems (Linux)

- Construction Spark source and application development environment (Server)

- Linux protobuf-c (Linux)

- redis main building and disaster recovery from a cluster deployment (Database)

- On the PC goes heavy security watch your startup items (Linux)

- awk Programming Model (Programming)

 
         
  To install and use Docker under linux
     
  Add Date : 2018-11-21      
         
         
         
  Docker is an open source engine, you can easily create a lightweight any application, portable, self-contained container.
Developers in a notebook compiled by the test container can batches in a production environment deployment, including VMs (virtual machines), bare metal, OpenStack cluster, and other basic application platform.
Docker all source code is written in Go.
 
First, the basic environment
1, character, ip, version, kernel
serverA 10.1.10.236 3.16.0-4-amd64 8.1 docket
docket 1.6.2
 
Second, the installation docter
1, the source added
echo "deb http://http.debian.net/debian jessie-backports main" >> /etc/apt/sources.list
 
2, the update source
apt-get update
 
3, the installation package docker.io
apt-get install docker.io
Reading package lists ... Done
Building dependency tree
Reading state information ... Done
The following extra packages will be installed:
  aufs-tools cgroupfs-mount git git-man libapparmor1 liberror-perl libnih-dbus1 libnih1 makedev mountall plymouth
Suggested packages:
  btrfs-tools debootstrap lxc rinse git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn desktop-base
  plymouth-themes
The following NEW packages will be installed:
  aufs-tools cgroupfs-mount docker.io git git-man libapparmor1 liberror-perl libnih-dbus1 libnih1 makedev mountall plymouth
0 upgraded, 12 newly installed, 0 to remove and 54 not upgraded.
Need to get 9,986 kB of archives.
After this operation, 47.2 MB of additional disk space will be used.
Do you want to continue? [Y / n]
 
4, check the version
docker --version
Docker version 1.6.2, build 7c8fca2
 
5, start the service
/etc/init.d/docker start
[Ok] Starting docker (via systemctl): docker.service.
 
6, pull debian and CentOS mirrors
1) Pull debian mirror
docker pull debian
latest: Pulling from debian
843e2bded498: Pull complete
8c00acfb0175: Pull complete
debian: latest: The image you are pulling has been verified Important:. image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256: d9168a2c1889b4c9d44952a23065c29b0656237909d618328275f42065602354
Status: Downloaded newer image for debian: latest
2) pull centos mirror
docker pull centos
Pulling repository centos
0f73ae75014f: Download complete
47d44cb6f252: Download complete
f6f39725d938: Download complete
f9a8cbc8dd13: Download complete
f37e6a610a37: Download complete
Status: Downloaded newer image for centos: latest
 
7, to view mirror
docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
debian latest 8c00acfb0175 3 weeks ago 125.2 MB
centos latest 0f73ae75014f 3 weeks ago 172.3 MB
 
8, run named debian mirror container (virtual out of a debian system)
1) running debian mirror container
docker run -i -t debian
2) View version
root@10.1.10.236: ~ # docker run debian cat / etc / debian_version
8.2
3) Check IP (dhcp get is not the same per-acquisition)
root@10.1.10.236: ~ # docker run debian ip a
1: lo: < LOOPBACK, UP, LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link / loopback 00: 00: 00: 00: 00: 00 brd 00: 00: 00: 00: 00: 00
    inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
    inet6 :: 1/128 scope host
      valid_lft forever preferred_lft forever
24: eth0: < NO-CARRIER, BROADCAST, UP, LOWER_UP> mtu 1500 qdisc noqueue state DOWN group default
    link / ether 02: 42: ac: 11: 00: 0b brd ff: ff: ff: ff: ff: ff
    inet 172.17.0.11/16 scope global eth0
      valid_lft forever preferred_lft forever
    inet6 fe80 :: 42: acff: fe11: b / 64 scope link tentative
      valid_lft forever preferred_lft forever
4) Check the kernel
root@10.1.10.236: ~ # docker run debian uname -r
3.16.0-4-amd64
5) Check the hard disk partition situation
root@10.1.10.236: ~ # docker run -i -t debian df -Th
Filesystem Type Size Used Avail Use% Mounted on
none aufs 9.1G 1.6G 7.1G 18% /
tmpfs tmpfs 115M 0 115M 0% / dev
shm tmpfs 64M 0 64M 0% / dev / shm
/ Dev / sda1 ext4 9.1G 1.6G 7.1G 18% / etc / hosts
 
9, run called centos mirror container (out of a virtual system centos)
1) Run centos mirror container
docker run -i -t centos
2) View version
root@10.1.10.236: ~ # docker run centos cat / etc / RedHat-release
CentOS Linux release 7.1.1503 (Core)
3) Check the kernel
root@10.1.10.236: ~ # docker run centos uname -r
3.16.0-4-amd64
4) Check ip
root@10.1.10.236: ~ # docker run centos ip a
1: lo: < LOOPBACK, UP, LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link / loopback 00: 00: 00: 00: 00: 00 brd 00: 00: 00: 00: 00: 00
    inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
    inet6 :: 1/128 scope host
      valid_lft forever preferred_lft forever
46: eth0: < NO-CARRIER, BROADCAST, UP, LOWER_UP> mtu 1500 qdisc noqueue state DOWN
    link / ether 02: 42: ac: 11: 00: 16 brd ff: ff: ff: ff: ff: ff
    inet 172.17.0.22/16 scope global eth0
      valid_lft forever preferred_lft forever
    inet6 fe80 :: 42: acff: fe11: 16/64 scope link tentative
      valid_lft forever preferred_lft forever
5) Check the hard disk partition situation
root@10.1.10.236: ~ # docker run centos df -Th
Filesystem Type Size Used Avail Use% Mounted on
rootfs rootfs 9.1G 1.6G 7.1G 18% /
none aufs 9.1G 1.6G 7.1G 18% /
tmpfs tmpfs 115M 0 115M 0% / dev
shm tmpfs 64M 0 64M 0% / dev / shm
/ Dev / sda1 ext4 9.1G 1.6G 7.1G 18% / etc / hosts
tmpfs tmpfs 115M 0 115M 0% / proc / kcore
tmpfs tmpfs 115M 0 115M 0% / proc / timer_stats
     
         
         
         
  More:      
 
- Linux cron job (crontab) Examples (Linux)
- Use PuTTY to access the virtual machine Linux under Windows xp (Programming)
- UNIX and class UNIX system security check notes (Linux)
- Redis is installed and set up Ubuntu 14.04 from the environment under the main ssdb (Server)
- Logging information through the web GUI (LogAnalyzer) (Server)
- Oracle 10g in the unique and index problems (Database)
- NFS installation process under the CentOS (Linux)
- Linux installation and configuration curl command tool (Linux)
- Several Methods of SSH Auto - login (Linux)
- Oracle 12c detailing the new features (Database)
- Using iptables achieve NAT (Linux)
- Oracle 10g, 11g database silent installation of small differences (Database)
- Linux, Eclipse flash back and reinstall the JDK methods (Linux)
- Gentoo: existing preserved libs problem solving (Linux)
- CentOS7 build GlusterFS (Linux)
- Python is not C (Programming)
- Based LNMP + uWSGI deploy Django applications (Server)
- How to Install Android Studio on Ubuntu 15.04 / CentOS7 (Linux)
- How to install and use the malware detection tool LMD and ClamAV antivirus engine on Linux (Linux)
- DB2 manually create a library (Database)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.