How to install external module to Docker image

byt the way to edit this image to add

trytoncommunity-account-es-facturae
trytoncommunity-edocument-es-facturae

i just make a docker file and

FROM tryton:latest
RUN pip install trytoncommunity-account-es-facturae && pip install trytoncommunity-edocument-es-facturae

then docker build -t

or is more complicated?

You should probably use pip3 with the --break-system-packages and --no-cache-dir arguments, like:

FROM tryton:7.0
RUN pip3 install --break-system-packages --no-cache-dir trytoncommunity-account-es-facturae trytoncommunity-edocument-es-facturae

Also it is better for production to use a pinned series as the upgrade is not necessary supported by the custom module (which by the way only works for 7.0 series).
And you need to set a name for the tag.