On Thu, Aug 18, 2016 at 5:45 PM, Tiglath <tiglathsur...@gmail.com> wrote:

>
> Understood.  Thanks again.
>
> Now, you can take the time to find out every dependency for a program you
> need, say nginx, or postgress and install just that in a container, which
> can be laborious, or just
> dump a whole Ubuntu userland that will probably cover all the bases, yet
> include much that is unneeded.
>

Yes. But also remember that docker uses a layered filesystem. So the ubuntu
disk image is only exist onces. And its shared amongst all of your images.

(you still need to download it the 1st time though, and again for any base
image updates).


> So...
>
> Are the available ready-made images, say for postgres, tailored to contain
> only that which postgress needs and no more?
>

Yeah probably, dunno.

Or else you might get a much smaller base image e.g. when derived from
alpine linux, which is very small to begin with, and will lead to much
smaller overall image sizes.

Personally I just use ubuntu:16.04 for everything, as its only ~121mb or
something like that. Which isnt *that* big. And fewer problems / issues
with ubuntu.

Then if I want to augment that image with other stuff like say Flask, I
> have do do it manually through the docker file, same as I would to add my
> app, right?
>
> Or is there a way to conjoin ready made images, say one for postgress and
> one for Flask, so that the combination has no conflicts and duplications?
>

Perhaps the most effecient way would be to build one ontop of the next, in
a vertical hierachy or tiers. I have done that myself several times before
in proects. For example:

image1.dkr:
FROM ubuntu:16:04

# add postgres or whatever
# blah...

========
then

image2.dkr:
FROM you/image1

# add flask or whatever
# blah...

=========

Then you/image1 would have postges in it only.
And you/image2 would have postgres + flask in it together.

and you can re-use your base postgres image amongst your other similar
projects.

- OR -

You could instead make nginx for your image1 layer rather than postgres. It
depends how you want to structure your LAMP stack.



> Thanks
>
>
>
> On Thursday, August 18, 2016 at 12:11:38 PM UTC-4, Dreamcat Four wrote:
>>
>> it does have the ubuntu userland. But the only program you are running is
>> /bin/bash.
>>
>> So you could instead just have the file /bin/bash inside the container,
>> and any .so libs it requires. And it would still run fine.
>>
>> Other docker base images do not have any full OS userland in it. For
>> example:
>>
>> FROM scratch
>>
>> has nothing in it.
>>
>>
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "docker-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to docker-dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"docker-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to docker-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to