138k views
3 votes
How to change default storage-driver or log-driver?

A) docker config
B) docker system
C) docker daemon
D) docker-compose

1 Answer

4 votes

Final answer:

To change the default storage-driver or log-driver in Docker, one should modify the Docker daemon configuration file, typically daemon.json, and then restart the Docker service. The correct option to change these settings is C) docker daemon.

Step-by-step explanation:

To change the default storage-driver or log-driver for Docker, you need to configure the Docker daemon. The correct way to change these settings is to modify the Docker daemon configuration file, typically called daemon.json. This file is usually found at /etc/docker/ on Linux systems or within the Docker installation directory on other operating systems.

You can change the storage-driver by adding a "storage-driver": "desired-driver" line and the log-driver with a "log-driver": "desired-driver" line within the daemon.json file. After making changes to the daemon.json file, you will need to restart the Docker service for the changes to take effect.

To answer the original question, the correct way to change these settings is through option C) docker daemon.

User Bryan Schoen
by
8.0k points