How to build a Rocket.Chat docker image

The exact dockerfile that generates the tag is in our repo: https://github.com/RocketChat/Rocket.Chat/blob/develop/.docker/Dockerfile

I’m guessing this is the exact same one you are trying.

We do a meteor build in our ci and then at the end of the build take the bundle folder produced and we tar it up and ship it off, as well as produce the docker image.

You can see from our circle ci that first we install meteor: https://github.com/RocketChat/Rocket.Chat/blob/develop/.circleci/config.yml#L91

Then we build Rocket.Chat: https://github.com/RocketChat/Rocket.Chat/blob/develop/.circleci/config.yml#L150
https://github.com/RocketChat/Rocket.Chat/blob/develop/.circleci/config.yml#L158 - this line being the one that does the actual build and will spit out a bundle in the folder specified.

Then you can see here where we do an image build: https://github.com/RocketChat/Rocket.Chat/blob/develop/.circleci/config.yml#L301

So… you could probably do something like:

meteor build --server-only --directory /tmp/rc-build
cp .docker/Dockerfile /tmp/rc-build
cd /tmp/rc-build
docker build -t someimage .

After of course doing the normal dev steps to install npm dependencies