linux - Docker: How to create a stack, multiple images or one base image? -
i new using docker, , got doubt of using 1 image base stack or have define each image depending on needs.
example, reading blog creating website using docker author suggests following stack:
image taken http://project-webdev.blogspot.de/2015/05/create-site-based-on-docker-part4-docker-container-architecture.html
now, seen structure, if have base images in docker registry technologies mongodb, io.js, nginx, why on examples not use images insted of using single docker base image everything?
i'm author of blog post/series, let me elaborate on reason why i've chosen 1 base image. :)
docker offers possibility use common base image subsequent images, can stack images , each image contains diff underlying image (that's big advantage of docker!). can save disk space , ram. if don't care (i mean ram , storage cheap) can use multiple images.
another advantage of 1 base image can configure/secure base image based on needs. if use different base image each container, have maintain of them (e.g. firewall) , docker download several different images (uses more disk space, container builds take longer)).
but what's difference when @ official images? official mongodb, redis , mysql images based on debian:wheezy image. if use these images, based on same base image, won't they?
anyway, if want use own architecture, feel free... please consider architecture/blog post possible idea of creating docker setup. docker , way shares kernel, can use many images want. :)
regards,
sascha
Comments
Post a Comment