docker-meteor icon indicating copy to clipboard operation
docker-meteor copied to clipboard

A small Docker image to run you Meteor apps without surprises

grigio/docker-meteor

docker-meteor

This is a docker container image which use node provided by Meteor itself. You can use grigio/meteor:<version> as a development sandbox or as a base to build your production image for your project.

grigio meteor

The Meteor images available are on Docker hub

More info in a dedicated post.

Development mode

❯ sudo docker run -it -v $PWD/my-meteor-app:/app -p 1234:8080 grigio/meteor:1.0 /bin/bash
root@4bae180c01a0:/app# meteor --release $METEOR_RELEASE -p 8080
[[[[[ ~app ]]]]]                              

=> Started proxy.                             
=> Started MongoDB.                           
=> Started your app.                          

=> App running at: http://localhost:8080/

Production mode

You need to build a Dockerfile based on grigio/meteor-docker an then run it.

FROM grigio/meteor:1.0
MAINTAINER Your Name

# Add the source of your Meteor app and build
ADD ./demo /app 
RUN /meteor-build.sh

# Run the generated files
CMD /meteor-run.sh
❯ sudo docker build -t grigio/docker-meteor-demo .
❯ sudo docker run -e "MONGO_URL=mongodb://172.17.0.4:27017/mytest" \
  -e "ROOT_URL=http://example.com" -p 5555:8080 -it grigio/docker-meteor-demo sh /meteor-run.sh

..and the Meteor app starts in seconds :)