# Setting Docker Image Caching

## Prerequisite

* You must have an instance in your project. If not, learn how to [launch an instance](https://www.google.com/url?sa=E\&q=link-to-docs).

{% hint style="info" %}
If you launched your instance using a distribution image provided by NIPA Cloud Space, Docker Image Caching is already enabled, and no further configuration is necessary.

![](https://content.gitbook.com/content/4csDFrNQz0Q4tDnx3xyT/blobs/Pia3zTWws1OeGrLb27BY/image.png)
{% endhint %}

## Instructions

For images that are not NIPA Cloud Space distribution images, you must configure the Docker registry mirror to point to <https://registry-cache.nipa.cloud>.

### 1. **Edit the Docker configuration file**

Access and edit the /etc/docker/daemon.json file using the following command:

```
$nano /etc/docker/daemon.json
```

Add the following content to the file:

```
{
    "registry-mirror": "https://registry-cache.nipa.cloud"
}
```

Then, exit the editor and save the file.

### 2. **Restart the Docker service**

Restart the Docker service using the following command:

```
systemctl restart docker.service
```

### 3. **Verify the configuration**

Check that the configuration was applied successfully by running the following command:

```
docker info
```

The output under "Registry Mirrors" should now show <https://registry-cache.nipa.cloud>, confirming the process is complete.\
![](https://content.gitbook.com/content/4csDFrNQz0Q4tDnx3xyT/blobs/FGpZI2JBtpBhaU8DMnKQ/unknown.jpeg)<br>
