# Running commands inside discourse container?

**URL:** <https://meta.discourse.org/t/running-commands-inside-discourse-container/92811>\
**Category:** Product Support\
**Created:** [July 20, 2018, 2:41pm UTC](https://meta.discourse.org/t/running-commands-inside-discourse-container/92811 "2018-07-20T14:41:03Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ryanerwin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryanerwin/32/94589_2.png) [@ryanerwin](https://meta.discourse.org/u/ryanerwin)\
**Post date:** [July 20, 2018, 2:41pm UTC](https://meta.discourse.org/t/running-commands-inside-discourse-container/92811/1 "2018-07-20T14:41:04Z")

</div>

I would like to script `discourse restore...` but I don’t understand how to easily pass commands from the host to the discourse docker container. I tried:

`sudo docker run local_discourse/app discourse enable_restore`

but that didn’t work…

Ideally I could do something like `./launcher run app discourse enable_restore` and then `./launcher run app discourse enable_restore` and `./launcher rebuild app`

In case you’re curious, the reason to automate the discourse restore is so that I can do a nightly restore of the most recent live database on to our staging server.

---

_[View the full topic](https://meta.discourse.org/t/running-commands-inside-discourse-container/92811)._
