# How to run a ruby script inside docker container?

**URL:** <https://meta.discourse.org/t/how-to-run-a-ruby-script-inside-docker-container/67838>\
**Category:** Support\
**Created:** [August 10, 2017, 9:09pm UTC](https://meta.discourse.org/t/how-to-run-a-ruby-script-inside-docker-container/67838 "2017-08-10T21:09:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)\
**Post date:** [August 10, 2017, 9:36pm UTC](https://meta.discourse.org/t/how-to-run-a-ruby-script-inside-docker-container/67838/2 "2017-08-10T21:36:51Z")

</div>

One time run? Or does it have to happen every rebuild? One time directions:

On your droplet:

```plaintext
cd /var/discourse
cp YOURSCRIPT shared/
./launcher enter app

```

And you are inside the container. Your script is now available as `/shared/YOURSCRIPT`

That sort of thing is good for one time DB tasks (where the results are stored in the DB) or stuff that runs a report but doesn’t need to be there after the next upgrade. For stuff that needs to be around always, you have to work with the app.yml file.

(And backups are always good.)

---

_[View the full topic](https://meta.discourse.org/t/how-to-run-a-ruby-script-inside-docker-container/67838)._
