Skip to content

Instantly share code, notes, and snippets.

@sampaiodiego
Last active May 21, 2021 18:54
Show Gist options
  • Save sampaiodiego/d4cf97cf0729b664a8d550dbea50900b to your computer and use it in GitHub Desktop.
Save sampaiodiego/d4cf97cf0729b664a8d550dbea50900b to your computer and use it in GitHub Desktop.
Rocket.Chat build and Docker image creation
# creates a nodejs app bundle
meteor build --directory /tmp/rocketchat-build
# create docker image
cp Dockerfile /tmp
cd /tmp/rocketchat-build
docker build -t rocketchat:custombuild .
# run
docker run --name rocketchat-custombuild -p 3000:3000 --env MONGO_URL=mongodb://192.168.0.6:27017/demo --env MONGO_OPLOG_URL=mongodb://192.168.0.6:27017/local -d rocketchat:custombuild
FROM node:0.10
ADD . /app
RUN set -x \
&& cd /app/bundle/programs/server/ \
&& npm install \
&& npm cache clear
WORKDIR /app/bundle
ENV PORT=3000 \
ROOT_URL=http://localhost:3000
EXPOSE 3000
CMD ["node", "main.js"]
@sampaiodiego
Copy link
Author

this does not even works anymore

@ljcp
Copy link

ljcp commented Aug 9, 2019

@sampaiodiego where i can find the correct instruction to build a custom docker image ?

it's this correct ?

git clone https://github.com/RocketChat/Rocket.Chat
cd Rocket.Chat
meteor npm i
meteor build --directory /tmp/build
cp .docker/Dockerfile /tmp/build
cd /tmp/build/
docker build -t rocketchat .

@sampaiodiego
Copy link
Author

yes, it seems correct.. the best place right now is to look at the CI file: https://github.com/RocketChat/Rocket.Chat/blob/develop/.circleci/config.yml

@ksrx
Copy link

ksrx commented Apr 29, 2021

yes, it seems correct.. the best place right now is to look at the CI file: https://github.com/RocketChat/Rocket.Chat/blob/develop/.circleci/config.yml

Hi Diego, can you provide a new link to build my own docker image? Thanks

@devtronic
Copy link

devtronic commented May 21, 2021

yes, it seems correct.. the best place right now is to look at the CI file: https://github.com/RocketChat/Rocket.Chat/blob/develop/.circleci/config.yml

Hi Diego, can you provide a new link to build my own docker image? Thanks

https://github.com/RocketChat/Rocket.Chat/blob/629c56d2a24e78f9c7514a524b311d70e2a04d9e/.github/workflows/build_and_test.yml#L167

This is working for me (Tested under macOS)

#!/bin/sh
meteor npm install --platform=linux --arch=x64
meteor build --server-only --directory /tmp/rocketchat-build  --architecture os.linux.x86_64
cp .docker/Dockerfile /tmp/rocketchat-build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment