- work without further ado (assuming you bought your certificate from a CA that is trusted by your operating system)
**Cons:**
- ?
### 2. instruct docker to trust your registry as insecure
This basically tells Docker to entirely disregard security for your registry.
1. edit the file `/etc/default/docker` so that there is a line that reads: `DOCKER_OPTS="--insecure-registry myregistrydomain:5000"` (or add that to existing `DOCKER_OPTS`)
2. restart your Docker daemon: on ubuntu, this is usually `service docker stop && service docker start`
**Pros:**
- easy to configure
**Cons:**
- very insecure
- you have to configure every docker daemon that wants to access your registry
Be sure to use the name `myregistrydomain.com` as a CN.
Now go to solution 1 above and stop and restart your registry.
Then you have to instruct every docker daemon to trust that certificate. This is done by copying the `domain.crt` file to `/etc/docker/certs.d/myregistrydomain.com:5000/ca.crt`
**Pros:**
- more secure than solution 2
**Cons:**
- you have to configure every docker daemon that wants to access your registry
## Using Compose
It's highly recommended to use Docker Compose to facilitate managing your Registry configuration.
Here is a simple `docker-compose.yml` that does setup your registry exactly as above, with TLS enabled.