Cannot link to a non running container

Me again… ):
As I had trouble to replay a modified database to the tryton-postgres container, I tried to create a new tryton-postgres container. I removed the old one and then carried out the instructions from the installation site:

$ docker run --name tryton-postgres -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=tryton -d postgres
$ docker run --link tryton-postgres:postgres -e DB_PASSWORD=mysecretpassword -it tryton/tryton trytond-admin -d tryton --all

Then I replayed the sql dump, the only error message is:
ERROR: role “grptryton” does not exist

Restarted tryton-postgres and got a running tryton-postgres container:
$ sudo docker ps
e6b93444d180 postgres “docker-entrypoint.s…” 3 minutes ago Up 3 minutes 5432/tcp tryton-postgres

Now, when starting tryton:
$ sudo docker start tryton
Error response from daemon: Cannot link to a non running container: /tryton-postgres AS /tryton/postgres
Error: failed to start containers: tryton

What can I do?

Thanks lot in advance,

If you restore a backup, you should not initialize the database (which means no running trytond-admin).
The error about missing role should not be a problem as long as you restore the database using the same role that will be used by trytond.

I guess you must remove the previous tryton container as it is still linked to the old postgres container.

Yess! (-;
Creating a new tryton container which then links to the postgres did it.

As always - I’m very grateful!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.