Docker: Replace Ubuntu for Alpine Linux or other?


#1

Has anyone had a chance to experiment with a “minimal” docker image for Meteor?
From reading here, seems like there are some Node dependencies which cannot be installed in Alpine.
Tried with this one: https://registry.hub.docker.com/u/mhart/alpine-node/

Arch Linux with Node would be interesting. Such as: https://registry.hub.docker.com/u/nfnty/arch-nodejs/

I’ve been working on creating the most minimal dockerfile for Meteor with @jadsonlourenco .
See the result here:
https://registry.hub.docker.com/u/keyscores/minimal-meteor-docker/


#2

@lpgeiger unfortunately this is not possible with Alpine Linux, because Meteor need to compile some modules with NPM, the principal in this case is the “node-fibers”, which in turn depends on others using Python, then it not work. I try to do this for some time and still no success, 100%.

But I got 90% using another method, which is this: https://github.com/larsks/dockerize
I create a “Docker Image” base, from ubuntu, that has only the NodeJS+NPM, the final result just 5mb, and on my “App Image” I add my code, the bundle version, so the compile so faster.
BUT: my unique problem now is because this “Base Image” don’t resolve the DNS names, if I need to connect other server out of the container I need to use the IP address, so for example, then my database server need be on other container too, or set the unique IP to access.
I’m waiting new Meteor release (1.2), I hope they update to NodeJS 0.12, and it work on Alpine Linux.


#3

Thanks @jadsonlourenco
Sounds interesting just having a 5mb base image. Have you tried the Arch linux image I posted?
It seems like a strange error, not having the DNS resolve.
Maybe other people know if there a library for this?