Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Docker Meteor Base

This is a base container, intended to be used in building other Docker containers for Meteor apps.

Basic Usage

  1. Create a Dockerfile in your Meteor app directory that is based on robbinsd/meteor-base:

     # Dockerfile Contents
     FROM        robbinsd/meteor-base
     MAINTAINER  Example Jones <>
  2. Build the new containerized version of your app:

     $ docker build -t <name>/<appname> .
  3. Start a MongoDB container (remember its name):

     $ docker run --name mongo1 -d mongo
  4. Start your app container, linked to your MongoDB container

     $ docker run --link mongo1:mongo -P <name>/<appname>
  5. Use docker ps to discover the port assigned to your app (49158 below):

     $ docker ps
     CONTAINER ID  IMAGE                    ...  PORTS                     NAMES
     5e52eebf7e5c  <name>/<appname>:latest  ...>3000/tcp   hungry_lalande
     50b96c3e278b  mongo:latest             ...  27017/tcp                 mongo1
  6. Open your Meteor app in the browser at http://localhost:\<port> for Linux, or\<port> for Boot2Docker users.


Environment Variables

Set with one -e flag per variable when running your container (e.g. docker run -e VAR1=value1 -e VAR2=value2 ...)

  • MONGO_URL enables the use of an existing MongoDB Deployment. Skip step 3 above.
  • DB selects the database used in the MongoDB container (test by default).
  • ROOT_URL sets the Meteor ROOT_URL.
  • PORT sets the port, but will require adding an EXPOSE to your Dockerfile, or running behind another proxy container.
Docker Pull Command
Source Repository