This seems to be no longer possible with the new version and is not recommended. If not, you can directly use soft link to modify the storage location.
ExecStart=/usr/bin/dockerd --graph=/work/docker_data --storage-driver devicemapper --storage-opt dm.loopdatasize=1000G --storage-opt dm.loopmetadatasize=10G --storage-opt dm.fs=ext4 --storage-opt dm.basesize=100G -H fd:// --containerd=/run/containerd/containerd.sock Supplement 2020.07.29 –graph is deprecated after version 17.0. Now it is recommended to use –data-root Additional knowledge: Docker orchestration tool uses docker-compose Install docker-compose
# If python-pip reports an error vim /etc/yum.repos.d/epel.repo Modify the configuration file, comment out metalink, and uncomment baseurl Operation Command Compose operation container (be sure to enter the configuration file directory) Start the container in the background: docker-compose up -d Check the running status of the container: docker-compose ps Stop and delete the container: docker-compose down Stop and remove the container and delete the volume: docker-compose down --volumes Stop and start the container: docker-compose stop; docker-compose start Use of docker-compose exec: docker-compose exec redis bash Summarize: To operate docker-compose, you must operate in the path of the configuration file docker-compose.yml Be sure to pay attention to the format, the space should be a space Configuration Files docker-compose.yml version: '3' services: nginx: image: mycentos:nginx ports: - "8080:80" volumes: - /home:/usr/local/nginx/html - /var/logs/nginx/logs:/usr/local/nginx/logs command: /usr/local/nginx/sbin/nginx -g "deamon off;" redis: image: mycentos:redis ports: - "6380:6379" If you change to host mode, remove ports and add network_mode: "host", the default is bridge Practice: Simulate the construction of a personal blog wordpress free blogging platform docker-compose.yml version: '3.3' services: db: image:mysql:5.7 volumes: -db_data:/var/lib/mysql restart: always environment: # Specify environment variables docker -itd -e MYSQL_ROOT_PASSWORD= somewordpress MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: depends_on: # 1. Start the above db (dependency) first before it can be installed 2. docker link -db image: wordpress:latest ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress WORDPRESS_DB_NAME: wordpress volumes: db_data: {} # Corresponding to the top volumes: Find Volume Label
Mountpoint host path The corresponding is /var/lib/mysql The above Docker changes the docker storage location and changes the container image size limit operation is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
>>: Vue: Detailed explanation of memory leaks
Table of contents 1. Background 2. Prerequisites ...
Table of contents Preface 1. Preview of office do...
■ Website theme planning Be careful not to make yo...
1. Installation Instructions Compared with local ...
Customizing images using Dockerfile Image customi...
Summary of common operators and operators in java...
Content Detail Tags: <h1>~<h6>Title T...
<br />From the birth of my first personal pa...
This article shares with you two methods of setti...
This article shares the specific code of JavaScri...
https://docs.microsoft.com/en-us/windows/wsl/wsl-...
Preface: When we are making web pages, we often n...
Table of contents 1 The role of Apache 2 Apache I...
1. Install Zabbix Agent to monitor the local mach...