Cloud host-Offline installation Docker deployment application in production environment

Source: Internet
Author: User
Tags docker ps docker run
Offline install docker, configure Docker, and use Docker

As an offline deployment of Docker in a production environment, as well as deployment of applications using Docker, the following records make very detailed operational steps

Download Docker offline installation package:

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

Windows version download address: https://download.docker.com/win/static/stable/x86_64/

Download the following installation package according to your own system version of my cloud host kernel version, view kernel version: Uname-r


Download Docker offline installation package according to kernel version

Install the download of the RPM package: Rpm-ivh *.rpm

After the installation is complete, detect if the installation is successful, and view the Docker version


Related Operations for Docker services

Mode one: Service Docker Status/start/stop/restart State, start, stop, reboot

Mode two: Systemctl status/start/stop/restartdocker.service

View service Status

Start the Docker service


Stop Docker Service


View Docker details: Docker info

If you want the service file to be generated in the specified directory when the Docker service is started

Edit File configuration:/usr/lib/systemd/system/docker.service

Modify Execstart=/usr/bin/dockerd--grap Target_path

Restart the Docker service and view the Dockerinfo again

View the directory situation, you know, modify the Docker server boot path configuration file takes effect

Mirroring Operations

View the images that exists in Docker, and export the images

Dockerimages

Dockerexport-o Img.tar repository or image ID

Import mirroring operation

Cat images.tar| Docker Import–image-name:tag


Start

Docker run-i-T--name jz_test D6606ef89a9b/bin/bash

viewing mirrors: Docker ps-a

Start mirroring: Docker Startimage-names

Exit: Exit
Containerid: The only representation of a container.

Image: The mirror used when creating the container.

command: The last command to run the container.

created: Time to create the container.

Status: Container state.

Ports: Ports open to the outside. The port can be specified by the-p parameter.

names: container name. A container can be uniquely identified as a container ID, and a container with the same name is not allowed on the same host computer or it will conflict.


Resources:

Installation instructions: https://docs.docker.com/engine/installation/linux/docker-ce/centos/#uninstall-docker-ce

User guide: https://docs.docker.com/engine/userguide/#manage-storage-drivers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.