D
D
dlakazov2019-02-23 17:12:00
Docker
dlakazov, 2019-02-23 17:12:00

How to force docker to store only dependencies and the program itself?

I have such a question, here is ubuntu and docker on it, and in each container there is one daemon, mariadb10.2, mariadb10.3, MySQL, nginx, php-fpm. And of course, all of them have their own OS, to install the subd you need apt repositories, for example, the nano editor, curl, and everything without which is difficult on linux, and then at least everything is isolated, but it all takes up a lot of space, let's say the nano editor in all containers, this is a load and duplication is not desirable, so I would like to know how you can inherit everything you need from the main system, and only store the necessary programs in containers

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-02-23
@dlakazov

You did not understand the docker philosophy along the way. Why should the database, php, nginx be stuffed into one container, and even more so keep nano there? Separate them into different containers and use ready-made images from the docker hub. All you need to edit, do it on the host system and re-salt the image, find a video with best practices on how to reduce build time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question