Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ How to install Docker and basic usage on Ubuntu 15.04     - Use Markdown editor for document work under Linux (Linux)

- Unsafe reboot start (Linux)

- Analytical Ceph: handle network layer (Server)

- Oracle rebuild index script (Database)

- About Nginx 7 (Server)

- Find details block device with Linux blkid command (Linux)

- Kernel compile under Debian (Linux)

- C ++ complex class of operator overloading (Programming)

- Linux, MySQL root privilege escalation another method (Linux)

- Turning off the interface eth0: error: Disconnect the device 'eth0' (Linux)

- Iptables Instructions (Linux)

- ACL permissions Linux command (Linux)

- 10 Linux in the passwd command examples (Linux)

- Java in the inverter and covariance (Programming)

- LVM management reduces swap partition space to the root partition (Linux)

- Ubuntu 14.04 VirtualBox can not start solution (Linux)

- Python variable type (Programming)

- Linux NIC driver and version information (Linux)

- Linux environment installation of rvm and ruby (Linux)

- About Linux backdoor (Linux)

 
         
  How to install Docker and basic usage on Ubuntu 15.04
     
  Add Date : 2018-11-21      
         
         
         
  Docker is now more and more fire, and substituted KVM trend, of course, I think that still have their advantages, I contacted Docker is currently limited to the message text on the original text of this article is Howtoforge, so the translation may be lacking local, please correct me.

Docker is an open source project, developers and system administrators to provide an open platform, in any place and run applications through packaged as a lightweight container. Docker automatic deployment of applications in the software container. Docker beginning by the Solomon Hykes dotCloud as an internal development project, an enterprise PaaS (platform as a service platform and services), the software is now maintained by the community and Docker Docker companies Docker more information you can visit: https: // docs.docker.com/.

We can provide through the official KVM and Docker Docker images more images of know what Dock:

Docker install the required conditions: the need for 64-bit architecture of the system and the Linux 3.10 kernel or later. Here the authors use kernel version 3.19 Ubuntu15.04 system.

Learn more about some of Docker

Here you can learn the most basic conditions docker world.

Docker Images

Docker image Docker container is the most basic template. image generic container and make the system easy to install applications, Docker image is used to run the container, you can find a lot of images (multiple operating systems and the software has been installed in Docker) here https://hub.docker.com /.

Docker Container

Docker container (Docker Container) is an Image, to read and write on a running Docker image. Docker is a combined file system as a container background, any change in the container will be stored on a new basic image layer. We install the application layer is the container. Each container run on the host machine are independent, thus providing a secure application platform.

Docker Registry

Docker registry for Docker images provided by the library. It provides public and private libraries. Public libraries are called Docker Docker Hub. Here we are able to push and pull to upload our own images.

Docker installed on Ubuntu 15.04

Below we will guide you how to install the docker. We need to check before installing the operating system kernel version and architecture.

Run the command:

uname -a

You can see that we are using ubuntu 15.04 64-bit version of the kernel and kernel 3.19.

Docker now run the installation command:

sudo apt-get install -y docker.io

Wait until the installation is completed, and now we use the following command to start Docker:

systemctl start docker

Runtime enable docker boot command:

systemctl enable docker

You may want to check the docker version:

docker version

Now, docker already installed on your system. You can download a container made from Docker Docker Image Library.

Basic usage of Docker

In this section, I will introduce you to common options Docker command. Such as how to download a docker image, create a container, as well as how to access the container.

To create a new container, you should choose a basic image of the operating system, such as start Ubuntu or CentOS or other systems. You can search using a basic image Docker search command:

docker search ubuntu

This command displays all ubuntu images, you can try your own search centos Images.

Now we now base image to our service, use the command:

docker pull ubuntu

Now, you can view all downloaded images by using the command:

docker images

Ubuntu image download from DockerHub / Docker Registry. The next step is to create the container from the mirror.

To create the container, you can use docker create or docker run

docker create ubuntu: 14.04

docker create command creates a new container, but it will not start. So now you need to use the command:

docker run -i -t ubuntu: 14.04 / bin / bash

This command will create and run a Ubuntu14.04 mirror-based container, the container and run a command / bin / bash, you will automatically run the command in the container.

When you enter the Exit command to exit the container, the container is stopped, if you want to run in the background container in the command, append -d parameter.

docker run -i -t -d ubuntu: 14.04 / bin / sh -c "while true; do echo hello world; sleep 1; done"

/ Bin / sh -c "while true; do echo hello world; sleep 1; done" this is bash script to echo "hello word" forever.

Now you can see the container run in the background by the command:

docker ps

If you want to see the log results from the bash command, use the command:

docker logs NAMES / ContainerID

How to access the container shell in the background? This command will connect your container shell:

docker exec -i -t NAMES / ContainerID

You can see the host name and the container ID is equal, which means that you are within the container shell. When you type 'exit`, will leave the shell on the shell, but the container is still running.

You will often use another command is:

docker stop NAME / ContainerID

This will stop the container without deleting it, so you can restart it with the command:

docker start NAME / ContainerID

If you want to delete a container, stop it, then use the command to delete it:

docker rm NAME / ContainerID
     
         
         
         
  More:      
 
- Oracle database import and export (Database)
- Oracle query start with connect by tree (Database)
- CentOS / RHEL 6 was repeated prohibited under the SNMP connection log (Server)
- Windows 7 hard disk to install Ubuntu 14.10 (Linux)
- Ubuntu 14.04 Nvidia proprietary drivers for install two graphic cards (Linux)
- Linux SU command security Suggestions (Linux)
- HAProxy Windows version of the compiler and its application in the CORS (Server)
- Ubuntu 14.10 users to install Audio Recorder 1.5.7 (Linux)
- Java rewrite equals method (Programming)
- Use FFmpeg processing high quality GIF (Programming)
- CentOS7 installation performance monitoring system (Server)
- Linux platform Oracle MySQL connection (Database)
- Ubuntu 14.04 installed Nvidia CUDA 7.5 and build Python Theano deep learning development environment (Linux)
- Single-node Hadoop installation notes distributed pseudo & (Server)
- RedHat / CentOS ext4 partition can not be formatted large supplementary ext4 formatting (Linux)
- Android first line of code study notes (Programming)
- Deepin Tutorial: Depth Description Installer expert mode (Linux)
- MySQL script incremental backups (innobackupex) (Database)
- sed and awk in shell usage and some examples (Linux)
- Linux_Logo - output color ANSI Linux distributions logo command-line tool (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.