Docker deployment

I’ve tried some deployment tehniques but none of them worked. Is there any step-by-step guide on how to properly deploy Meteor app with Docker?

I’ve tried with:



https://hub.docker.com/r/mquandalle/wekan/

I’ve succesfully created images with above methods but all containers exit with error.

Haven’t tried with:



I have been in your same situation and actually never solved it! So I follow this post just in case you find an answer :slight_smile:

We deploy our app now using meteor 1.4.2.3 via two Docker images. We run meteor build prior to running Docker (to a directory, not a tarball). One of the problems with the old Docker images is that they’re based on Node 0.10.xx while Meteor 1.4.x is based on Node 4.x.x.

This is an example of one of the Docker files we use. Help is in the comments:


FROM node:4.6.2-slim

This Dockerfile lives where the meteor bundle has been built to a directory,

not a tarball.

e.g. If you run ‘meteor build …/output/base --directory --architecture=os.linux.x86_64’

then the Dockerfile lives in …/output/base

Bundle app source into the image

COPY . /opt/meteor

Install app dependencies (not sure if the export LINK=g++ is needed, but this works)

RUN export LINK=g++ && (cd /opt/meteor/dist/bundle/programs/server && npm install)

ENV PORT 80

EXPOSE 80

CMD [“node”, “/opt/og/dist/bundle/main.js”]

Ah, all the bold above is actually comment. Cut and pasted from the Dockerfile and the pound symbol for comment is bold in markdown.

Hi,

What exact issues did you face with ‘How to dockerize a meteor app with just one script’? :slight_smile:

I get ‘No space left on device’ error. It might be this bug: https://github.com/gliderlabs/docker-alpine/issues/231#issuecomment-269323327, but haven’t fixed it yet.

Mmh, interesting. I never had such a problem, thus I wasn’t aware of this issue.

I suppose reason for this error is outdated kernel, because I managed to succesfully create an image and container on another computer. So - the problem was on my side. :slight_smile:

That’s good news! :slight_smile:

Here’s a Dockerfile that should do the job:

FROM aedm/minimeteor