I have a server with several lxc containers. In some of the containers there is a docker installed. Usually a docker compose action in these LXC containers results in container names with the format appname_service_1
, e.g. wordpress_app_1
and wordpress_db_1
, when app
and db
are two services which are called in the wordpress
compose file - you know it.
But today i created another LXC container and installed docker in it. The setup is identical to the other containers, thanks to ansible. However, the docker container names are different, e.g. wordpress_db_1_c9de200f9abd
. The hash at the end differs whenever i delete the container and re-create it.
Since this makes containers not so disposable as they should be, because it destroys any routes between the containers, i'd like to know why this hashes are appended at all. All LXC containers have the same docker and the same docker-compose version installed. I'd like to prevent these hashes in my docker container names at all.
Why are they now occuring and didn't occur before?