Change Docker root directory /var/lib/docker to another location
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- docker, linux
- Área
- devops, infrastructure
Línea de trabajo
Review the repository's existing organization for programming tips, then verify the Docker commands and storage-driver references in the issue against the linked Docker documentation. Done means the relocation instructions are added in the project's established format and clearly cover stopping, moving, reconfiguring, restarting, and filesystem limitations.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
By default, Docker stores most of its data inside the /var/lib/docker directory on Linux systems. There may come a time when you want to move this storage space to a new location. For example, the most obvious reason might be that you’re running out of disk space.
1.How to edit systemd to accommodate new Docker location? stop the service, update config, and restart
$sudo systemctl stop docker.service
$sudo systemctl stop docker.socket
$sudo vim /lib/systemd/system/docker.service
The line we need to edit looks like this:
ExecStart=/usr/bin/dockerd -H fd://
Edit the line by putting a -g and the new desired location of your Docker directory. When you’re done making this change, you can save and exit the file.
# for old docker
ExecStart=/usr/bin/dockerd -g /mnt/data/docker/ -H fd://
# for newer versions
ExecStart=/usr/bin/dockerd --data-root /mnt/data/docker/ -H fd://
2.How to move your Docker installation to a new location?
sudo mkdir -p /data/docker
sudo rsync -aqxP /var/lib/docker/ /data/docker
start docker:
$ sudo systemctl daemon-reload
$ sudo systemctl start docker
Note, if you get error of:
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xeu docker.service" for details.
It may caused by File System not supported by docker. For my case, when I try to save docker data to NAS driver, it failed. For local driver, it works.
The docker data should be stored on a supported backing filesystem as mentioned here:
https://docs.docker.com/engine/storage/drivers/select-storage-driver/#supported-backing-filesystems
- Lenguaje dominante
- Python
- Estrellas
- 5
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de davideuler/programming-tips
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
-
list tags for docker imageAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 35/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
-
build milvus on MacAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Todos los issues de davideuler/programming-tips
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue Stellar Wave trivial
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
StellarCanary/ProtocolCanary-Fixtures#258 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
IBM/ai-atlas-nexus#295 ·
Los mantenedores suelen responder en 6 días
-
github_actions
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Hochfrequenz/aibap.mcp#578 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
mishraprafful/multihull#150 ·
Los mantenedores suelen responder en 1 día