docker-compose, add package to an image on creation of container without making own dockerfile


Some images want to be super tiny no matter what.

To the point of not even having tzdata package so timezone enviromental variable does not work.

and yes I tried mounting /etc/localtime or /etz/timezone or whatever I googled in that regard, it did not work for me and my Arch host.

So alternative would be that compose file would just apk add tzdata somehow, or maybe would alter dockerfile itself during composition.

I am aware I could do custom dockerfile but I dislike the idea of going away from docker-compose and have another stuff to deal with.

I understand if it was something bigger, but its just tzdata… I would very much like to stay inside compose

Is it possible or should I just accept the need for custom dockerfile?

submitted by /u/DoTheEvolution
[link] [comments]
Source: Reddit