# How do I add my docker credentials to Okteto so I can use private images in my Docker Compose?

**URL:** <https://community.okteto.com/t/how-do-i-add-my-docker-credentials-to-okteto-so-i-can-use-private-images-in-my-docker-compose/73>\
**Category:** How Do I?\
**Created:** [May 10, 2022, 5:14pm UTC](https://community.okteto.com/t/how-do-i-add-my-docker-credentials-to-okteto-so-i-can-use-private-images-in-my-docker-compose/73 "2022-05-10T17:14:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramiro](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/ramiro/32/6_2.png) [@ramiro](https://community.okteto.com/u/ramiro)\
**Post date:** [May 10, 2022, 5:14pm UTC](https://community.okteto.com/t/how-do-i-add-my-docker-credentials-to-okteto-so-i-can-use-private-images-in-my-docker-compose/73/1 "2022-05-10T17:14:34Z")

</div>

I want to be able to use private images on the Docker Compose I’m using in Okteto. Is there a way to specify the credentials?

---

<div class="post-metadata">

**Author:** ![arsh](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/arsh/32/421_2.png) [@arsh](https://community.okteto.com/u/arsh)\
**Post date:** [May 12, 2022, 4:24am UTC](https://community.okteto.com/t/how-do-i-add-my-docker-credentials-to-okteto-so-i-can-use-private-images-in-my-docker-compose/73/2 "2022-05-12T04:24:40Z")

</div>

Specifying docker credentials to Okteto is fairly easy - all you need to do is configure a [pull secret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) like you would in the case of Kubernetes manifests.

If you’re looking to add the credentials for your default service account, then you could also create a [secret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#registry-secret-existing-credentials) called `docker-registry` instead:

```auto
$ kubectl create secret docker-registry regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>

```

Once that is done, just update your service account, and it will automatically inject the credentials secret when deploying resources in the namespace:

```auto
$ kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "regcred"}]}'

```
