I’ve got an AWS ECS service that includes several containers that are nearly identical. I’ve initially built this with a dockerfile for each image, and it works fine but the builds are really slow, with a lot of duplicated effort. Building a single base image for all the containers seems like the Docker way to do this, but results in some overhead and seems like overkill so I am avoiding it.
I can solve this more easily by starting each container with a different entryPoint file BUT it means that at least one of the entryPoints would install a system package or two, and that feels a little “dirty.” I’m talking about things like apt-get install ...
. But I can’t think of any real problems with this, besides a bit slower startup.
Is this a terrible idea? Are there other issues I should be considering before installing packages in my entryPoint instead of in the docker image build?