# Use okteto cli from within a docker container

**URL:** <https://community.okteto.com/t/use-okteto-cli-from-within-a-docker-container/38>\
**Category:** How Do I?\
**Created:** [April 26, 2022, 7:38pm UTC](https://community.okteto.com/t/use-okteto-cli-from-within-a-docker-container/38 "2022-04-26T19:38:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/jacob/32/372_2.png) [@Jacob](https://community.okteto.com/u/Jacob)\
**Post date:** [April 26, 2022, 7:38pm UTC](https://community.okteto.com/t/use-okteto-cli-from-within-a-docker-container/38/1 "2022-04-26T19:38:07Z")

</div>

What is the best way to authenticate and run okteto cli from within a container?

---

<div class="post-metadata">

**Author:** ![AgustinRamiroDiaz](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/agustinramirodiaz/32/34_2.png) [@AgustinRamiroDiaz](https://community.okteto.com/u/AgustinRamiroDiaz)\
**Post date:** [May 5, 2022, 11:42am UTC](https://community.okteto.com/t/use-okteto-cli-from-within-a-docker-container/38/2 "2022-05-05T11:42:23Z")

</div>

I use WSL for development and the way I authenticate with okteto cloud is with a [token](https://www.okteto.com/docs/cloud/personal-access-tokens/).

- Go to [Okteto](https://cloud.okteto.com/#/settings/setup)
- Create a new token
- Run `okteto context use cloud.okteto.com --token your_token_goes_here`

Hope this helps
