MiniMeteor is an effort to simplify Docker image creation for Meteor projects. Works with Meteor 1.3.3 or higher.
$ curl https://aedm.github.io/minimeteor/build.sh | sh -s
myDockerTag[s]
Execute this in your project directory and it builds a Docker image. You don't need Meteor to be installed, only Docker.
FROM aedm/minimeteor
And then run $ docker build -t myDockerTag .
MiniMeteor exposes port 3000 by default.
$ docker run -d -e ROOT_URL=... -e MONGO_URL=... -p 80:3000 myDockerTag
The shell script version uses Alpine Linux to minimize footprint. It runs several passes to build the bundle and recompile NPM binaries for Alpine. The final build is copied into an alpine-node container.
The Dockerfile version installs Meteor and some build tools into a debian/slim container, builds the bundle, copies the Node.js executable from the Meteor installation into the project directory, and removes all tools.
One of MiniMeteor's goals is to use as little overhead as possible. Here are some image sizes for the default Meteor application: (generated by meteor create
)
Method | Compressed size on Docker Hub | Uncompressed size |
---|---|---|
MiniMeteor via shell script | 20M | 64.0M |
MiniMeteor via Dockerfile | 40M | 114.5M |
Meteor Launchpad by jshimko | 139M | 389.8M |
If you know about any other projects, please create an issue, and I'll include them in this table. Most projects I know about (eg. MeteorD and Meteor-Tupperware) are broken since Meteor 1.4.2.
It uses the exact same version that a given Meteor release uses.
No, MiniMeteor runs Meteor and Node.js as a non-root user.
The Dockerfile version should work with Meteor 1.3. It's unknown whether it works with versions below that. The script version requires [email protected]
which was added in Meteor 1.3.3.