# NoMethodError on docker run

**URL:** https://meta.discourse.org/t/nomethoderror-on-docker-run/60927
**Category:** Self-hosting
**Created:** [April 13, 2017, 2:37pm UTC](https://meta.discourse.org/t/nomethoderror-on-docker-run/60927 "2017-04-13T14:37:14Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![pmayer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmayer/32/121053_2.png) [@pmayer](https://meta.discourse.org/u/pmayer)
#### Post date: [April 13, 2017, 2:37pm UTC](https://meta.discourse.org/t/nomethoderror-on-docker-run/60927/1 "2017-04-13T14:37:14Z")

</div>

Hi guys,

I must admit, that I’m not a docker guru… only doing baby steps. I’ve installed Discourse about a year ago for testing on a local server. But as you know, things for “testing” suddenly get addopted and used on a daily basis.  
Discourse is used for our local makerspace and I wanted do move the docker Image to new machine. Discourse itself got updates via the administrator webinterface.

So I first stopped the containter with `docker stop <container-id>` and then wanted to export the docker image. Just to be sure to not have broken something, I’ve tried to “start” the docker image again:

```
pm@mandark:~ docker run local_discourse/app:latest
From https://github.com/SamSaffron/pups
   2b8776d..7bde3d3 master -> origin/master
Updating 2b8776d..7bde3d3
Fast-forward
 README.md | 2 +-
 lib/pups/config.rb | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)
I, [2017-04-13T14:34:38.212099 #17] INFO -- : Loading --stdin
/pups/lib/pups/config.rb:23:in `initialize': undefined method `[]' for nil:NilClass (NoMethodError)
	from /pups/lib/pups/cli.rb:27:in `new'
	from /pups/lib/pups/cli.rb:27:in `run'
	from /pups/bin/pups:8:in `<main>'

```

As the Image worked some minutes ago I’m not aware what to do now. Also I’m not sure if I used the `launcher` or not. When I try to `launcher start web` it will load a new discourse docker image from the web.

I’m using Ubuntu `16.04.2 LTS` with Docker version `17.04.0-ce, build 4845c56`.

Any help is appreciated.  
Thank you!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 13, 2017, 5:17pm UTC](https://meta.discourse.org/t/nomethoderror-on-docker-run/60927/2 "2017-04-13T17:17:22Z")

</div>

I recommend doing backup / restore through the web UI rather than moving the container itself.

---

<div class="post-metadata">

### Author: ![pmayer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmayer/32/121053_2.png) [@pmayer](https://meta.discourse.org/u/pmayer)
#### Post date: [April 13, 2017, 6:59pm UTC](https://meta.discourse.org/t/nomethoderror-on-docker-run/60927/3 "2017-04-13T18:59:01Z")

</div>

Hi Jeff,

sure will do - good point. But the problem at the moment is, that I can’t get the container to start up again.

Do you have any suggestions?

I can start `/bin/bash` with `-i` from within the container but don’t know how to fix the error in `pups` as the line 23 in the local `config.rb` is empty.

Thank you, cheers!

---

<div class="post-metadata">

### Author: ![pmayer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmayer/32/121053_2.png) [@pmayer](https://meta.discourse.org/u/pmayer)
#### Post date: [April 14, 2017, 11:35am UTC](https://meta.discourse.org/t/nomethoderror-on-docker-run/60927/4 "2017-04-14T11:35:47Z")

</div>

I have it up and running again with `./launcher rebuild app`…

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [April 15, 2017, 1:26am UTC](https://meta.discourse.org/t/nomethoderror-on-docker-run/60927/5 "2017-04-15T01:26:24Z")

</div>

The error was most likely caused by an error in your `app.yml` config file. Did you happen to fix anything before rebuilding?

---

<div class="post-metadata">

### Author: ![pmayer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmayer/32/121053_2.png) [@pmayer](https://meta.discourse.org/u/pmayer)
#### Post date: [April 15, 2017, 10:31am UTC](https://meta.discourse.org/t/nomethoderror-on-docker-run/60927/6 "2017-04-15T10:31:28Z")

</div>

Actually I did nothing in the `app.yml`. Only tried to fix pups’ `config.rb` which did not work.

---

<div class="post-metadata">

### Author: ![Muthukkumar](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@Muthukkumar](https://meta.discourse.org/u/Muthukkumar)
#### Post date: [March 22, 2019, 8:35am UTC](https://meta.discourse.org/t/nomethoderror-on-docker-run/60927/7 "2019-03-22T08:35:30Z")

</div>

I am having same issue while run the container image from different machine. My image is running in A machine then I have pushed the container image to dockerhub then pulled it to B machine.  
When I try to run the image I am not able to run it. Could some one help me fix it.

---

<div class="post-metadata">

### Author: ![Dev\_Work](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dev_work/32/124200_2.png) [@Dev\_Work](https://meta.discourse.org/u/Dev_Work)
#### Post date: [August 22, 2020, 7:58am UTC](https://meta.discourse.org/t/nomethoderror-on-docker-run/60927/8 "2020-08-22T07:58:44Z")

</div>

how did you solve the problem?

 ![2020-08-22_105817](https://global.discourse-cdn.com/meta/original/3X/e/8/e8b6b4ec5af25d66bc4c6bad384ba58e41577e44.png)

---

<div class="post-metadata">

### Author: ![Dev\_Work](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dev_work/32/124200_2.png) [@Dev\_Work](https://meta.discourse.org/u/Dev_Work)
#### Post date: [August 22, 2020, 8:11am UTC](https://meta.discourse.org/t/nomethoderror-on-docker-run/60927/9 "2020-08-22T08:11:53Z")

</div>

please tell me how to make a backup without using ui?  
(only via ssh)

upd: solved - [How to backup Docker discourse from command-line before rebuilding broken Discourse?](https://meta.discourse.org/t/how-to-backup-docker-discourse-from-command-line-before-rebuilding-broken-discourse/31052)

```plaintext
cd /var/discourse
./launcher enter app
discourse backup

```

---

<div class="post-metadata">

### Author: ![trying2survive](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@trying2survive](https://meta.discourse.org/u/trying2survive)
#### Post date: [November 15, 2020, 7:53am UTC](https://meta.discourse.org/t/nomethoderror-on-docker-run/60927/10 "2020-11-15T07:53:18Z")

</div>

I also got this error when trying to deploy on AWS ECS. I already passed the required environment variables from `./launcher start app`. Container was running fine on my standalone EC2 server.
