How to link containers in the portainer?

I have ldap container running in docker

now I want to run the container in portainer phpLdapAdmin

docker run --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-service --detach osixia/phpldapadmin:0.9.0

how can I link ldap-service which is the other container to this in portainer UI ?

The --link flag is not supported in Portainer… and may soon be removed by docker

You should consider putting both containers in the same network so that they may reference each other by name via a compose file. I give an example here:

1 Like