'Cannot generate django.po files from docker-compose

I'm using Django 3.0.5 inside of a docker-container, linked to an Postgres-container.

I would like to generate django.po files but when I'm trying to use this command:

docker-compose run web python3 manage.py makemessages -l en

I got this error:

CommandError: Can't find msguniq. Make sure you have GNU gettext tools 0.15 or newer installed.

Meanwhile, when I directly access to my container, it works: (Here, ad2b13f2fe87 is the ID of my django-container)

docker exec -it ad2b13f2fe87 bash

root@ad2b13f2fe87:/code# gettext --version
gettext (GNU gettext-runtime) 0.19.8.1
...

root@ad2b13f2fe87:/src# python3 manage.py makemessages -l en
processing locale en

Can someone explain me what the issue is? Thank you.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source