Data Base - importing countries or currencies

These two commands are not exactly equivalent…

  • docker exec runs the command inside an existing container, whereas
  • docker run creates a new container and runs the command inside that

This difference means that, in this case, the environment that the commands are running in is slightly different.

If you followed the How to run Tryton using Docker guide, then you should also find the following commands work:

docker exec --interactive --tty tryton / trytond_import_countries -d tryton


docker run --rm --interactive --tty --env DB_HOSTNAME=tryton-postgres --env DB_PASSWORD=${POSTGRES_PASSWORD} --network tryton tryton/tryton trytond_import_countries -d tryton