Running Discourse docker image in the environment on Amazon EC2 Container Service

I have installed discourse. I have the docker image of discourse. Can anybody help me how to run Discourse docker image in the environment on Amazon EC2 Container Service?

I am getting few errors when I m trying to run the task. It’s getting stopped and giving me errors like this in my logs:

I, [2017-06-27T18:26:47.304367 #13] 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>'

What was your process to getting the image there in the first place?

You did a local bootstrap, pushed the image to a registry somewhere, and is now trying to run that custom image?

Are all the volumes and env variables the same? Open ports, and db and redis servers accessible?

I will tell you what I did from start. Firstly I cloned the official discourse docker in my terminal. Then did


Then Edited containers/app.yml

./launcher rebuild app

Then pushed it on my git account.
Made a repo on AWS EC2 container service.
Then pushed the image that I had on my machine to the EC2 repo.
Then In task definition, I added 2 containers in my task definition. One is discourse and the other is about pulling discourse docker image from the environment I have deployed on as an independent entity.

I was not sure about volumes so I didn’t add it in my task definition.

Here are details of port mapping of my discourse container:

Host Port	Container Port	Protocol
80	                  443	           TCP

Port mapping for another container

Host Port   Container Port    Protocol
0                       443             TCP

@Falco Can you tell me what I did wrong?

git? You want to push the resulting image to a compatible docker registry.

I really recommend using the standard install guide on a standard EC2 Ubuntu.

I pushed it on my git so that I can have some back up if ever I loose my work on my machine. I have pushed the image on my AWS EC2 repo and that is a docker compatible. So we don’t have to worry about git at all. My main question is why is it not working for my EC2 environment?


I haven’t deployed Discourse on EC2 Container Service, but at least a few websites have done this with Elastic Beanstalk.

Some resources for you that I’ve stumbled upon in the past:

Do not mention people’s names in this manner, please, or you will be suspended.