Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launching a container with --link changes the display name of the target container in the portainer container list #5244

Closed
gigawatts opened this issue Jun 26, 2021 · 3 comments

Comments

@gigawatts
Copy link

Bug description
When a new container is launched with docker run --name bar --link foo, the display name of the existing foo target container changes to bar/foo in the portainer container list. However, if you click the bar/foo container from the list, portainer correctly shows its name as foo.

Expected behavior
The foo container should be displayed by it's name "foo", not the link alias name created when launching the bar container.

Steps to reproduce the issue:

  1. docker run -d --name foo bash yes
  2. docker run -it --name bar --link foo bash echo bar
  3. docker ps -a --format '{{.ID}}: {{.Names}}' | egrep 'foo|bar' shows the correct names of the containers
0424d33aaf40:  bar
90082da90384:  foo
  1. Look at portainer container list, filter by search word bar
    image
  2. Click on the incorrectly displayed bar/foo container, see that its still named foo and its name is displayed correctly in the container details page
    image

Technical details:

  • Portainer version: 2.6.0 (I also tested this in 2.5.0 and 2.5.1, same behaviour)
  • Docker version (managed by Portainer): moby-engine-20.10.6-1.fc34.x86_64
  • Kubernetes version (managed by Portainer): n/a
  • Platform (windows/linux): Linux, Fedora 34 64bit
  • Command used to start Portainer (docker run -p 9000:9000 portainer/portainer): docker run -d --name portainer -v "/var/run/docker.sock:/var/run/docker.sock" -v "vol_dir/data:/data" --restart always -p 9000:9000/tcp portainer/portainer-ce:latest -H unix:///var/run/docker.sock
  • Browser: Google Chrome | 91.0.4472.114 (Official Build) (64-bit)
  • Use Case (delete as appropriate): Using Portainer at Home
  • Have you reviewed our technical documentation and knowledge base? Yes
@srebala
Copy link

srebala commented Jun 28, 2021

Hi
There is a discussion already happening on link containers, kindly pl refer these tickets for link container issue #2211
#329

@gigawatts
Copy link
Author

Hi
There is a discussion already happening on link containers, kindly pl refer these tickets for link container issue #2211
#329

Oops, sorry, I had searched for link based issues before submitting this one, I guess I missed those.

I also didn't realize this behavior was that old, as I did not have this issue on my previous setup, which I believe was running Moby engine 18 and portainer 2.5 on fedora 32. Creating a link on that older setup did not rename the target container.

@samdulam
Copy link
Collaborator

samdulam commented Sep 7, 2021

#2211
#329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants