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