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

too many network aliases when recreating the container #521

Closed
aogg opened this issue Apr 29, 2020 · 5 comments · Fixed by #1699
Closed

too many network aliases when recreating the container #521

aogg opened this issue Apr 29, 2020 · 5 comments · Fixed by #1699
Assignees
Milestone

Comments

@aogg
Copy link

aogg commented Apr 29, 2020

image

@github-actions
Copy link

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

@simskij
Copy link
Member

simskij commented Apr 29, 2020

Hi,

Would you mind expanding on what the issue is and when it occurs?

Thanks,
Simme

@ginkel
Copy link

ginkel commented May 22, 2020

The issue IMHO is that a lot of aliases are accumulating over time (one additional alias per recreate). These are just the container IDs of former instances of this Docker container, which most probably do not serve any purpose, so they could be filtered out when recreating the container.

@simskij simskij self-assigned this Aug 18, 2020
@simskij simskij added this to the v1.1.0 milestone Aug 18, 2020
@simskij simskij modified the milestones: v1.1.0, v1.2.0 Dec 20, 2020
@simskij simskij modified the milestones: v1.2.0, v1.4.0, v1.5.0 Jan 22, 2022
@estromenko
Copy link

It seems like code from #1699 removes necessary labels added by docker compose.
Before restarting:

"Networks": {
      "cartman": {
          "IPAMConfig": null,
          "Links": null,
          "Aliases": [
              "backend",
              "4fcb8f2cd0cf"
          ],
          "NetworkID": "436b4634c942dc7ed8dbc91264b2902f963835297b8e79de174a303c3e512efe",
          "EndpointID": "20200dd70ca0b2d4c78e7382d1fd532b42b3d75d0591aacdc271d01c42c5a812",

After restarting:

 "Networks": {
      "cartman": {
          "IPAMConfig": null,
          "Links": null,
          "Aliases": [
              "8a165377fbb4"
          ],
          "NetworkID": "436b4634c942dc7ed8dbc91264b2902f963835297b8e79de174a303c3e512efe",
          "EndpointID": "e04e0ed1ef91c9c98c1b793172a8983e131d196ad13d1e8ec46b4b8affb61398",

Docker compose added service name backend to container's aliases, but after restarting it's not available anymore.

@piksel
Copy link
Member

piksel commented Aug 3, 2023

That was an oversight, yeah. I think we can deduce from labels what networks are "actual" aliases. A regex could potentially match a valid real alias name...

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

Successfully merging a pull request may close this issue.

5 participants