Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Option to link existing containers #329

Closed
vothanhkiet opened this issue Nov 6, 2016 · 13 comments
Closed

Option to link existing containers #329

vothanhkiet opened this issue Nov 6, 2016 · 13 comments
Labels

Comments

@vothanhkiet
Copy link

At the moment we don't have this option, can we add this feature in next milestone ?

@deviantony
Copy link
Member

Are you talking about the legacy container links?

https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/

Do you know that you can achieve the same results with Docker >= 1.9 and Docker networks ?

@deviantony
Copy link
Member

ping @vothanhkiet

@deviantony
Copy link
Member

Closed due to inactivity.

@gmarsay
Copy link

gmarsay commented Mar 23, 2017

I need too this feature for link selenium/hub and selenium/node-chrome-debug

I run manualy with docker run -d --link selenium-hub:hub selenium/node-chrome-debug

@gianniceresa
Copy link

True the --link is a deprecated legacy feature of Docker, but for quickly link things it's still a lot quicker and easier than create a new custom bridge network and attach the 2 containers to that network.
The idea behind #597 was not only to have access to all the possible flag of docker but also to expose a way to still use --link if needed (for now I create container by command line and only after I use Portainer to stop/start them, once I added all my custom flags and --link too).

@codefaux
Copy link

FWIW this "legacy feature" that "may eventually be removed" (quotes from the Docker docs referenced above) still seems to have no functional equivalent to my knowledge, and is presently hamstringing me being able to use an OpenVPN container to link to several local docker images with services that misbehave when sent thru typical tcp proxies (SOCKS, SQUID, TCP tunnels, etc) to my VPN, while exposing an nginx forward proxy to the local network to enable access via management hub software.

My home network may be trivial and the services aren't actually important to anyone but myself right now, but the fact remains - it's been over a year, Docker has (presumably?) updated several times now.

I'd like to have access to a manual way to use the UI for a link. I hesitate to do it by hand; I don't understand Docker/Portainer well enough to trust that something won't break if I try to update the container(s) through the UI later, or if the UI eventually DOES patch in support, etc etc etc - any official word? Can we link containers? Please? Can we get an official "just issue docker run <...> --link <...> from the command line and there won't be any issues with modifications from within Portainer UI" from someone?

Can we support links, with a caveat posted in oldschool HTML blink tags to make sure everybody notices that they might stop working? Granted, by then SURELY Docker upstream will have either finalized or superceded "link" support with something drop-in compatible or at least easily migratable given how many containers I would estimate have been deployed by now using it. As one option, you could import the same click-to-add elements from Port mappings or (even better) a similar dropdown scheme to Volumes, listing instead other linkable/running containers.

Honestly, I feel outright hindered by Portainer's lack of support of --link functionality, and while I understand how (nearly three years ago) your stance of "legacy and probably going away soon" would prevent adding it, but after being a maintained, functional feature for so long I suspect it'll go our way. Moreso if most of the popular management toolkits exposed its features, perhaps.

@ncresswell
Copy link
Member

ncresswell commented Aug 22, 2018 via email

@codefaux
Copy link

Hi there ncresswell, thanks for the reply.

I've had some "fun" issues with DNS and container names, but that aside -

How does this implement environment variable sharing as per --link 'spec'?
Also, is this network going to respect routes pushed by OpenVPN, etc? Are its DNS requests handled by the Docker engine via local resolvers, or network stack? What about containers that require a macvlan network?

Also, assuming I really DO want to paint my car red, is there any harm in manually specifying --link at the command line (and making the point of a monolithic management stack secondary) or is there a known reason not to use it other than "it's icky"?

@ncresswell
Copy link
Member

ncresswell commented Aug 22, 2018 via email

@deviantony deviantony reopened this Aug 22, 2018
@deviantony deviantony added kind/enhancement Applied to Feature Requests area/container-creation and removed status/stale labels Aug 22, 2018
@codefaux
Copy link

I'm happy to hear that, thank you for your consideration.

In the interrim, there is the issue of access control. I don't have explicit need of it, but I'm not the only one with a key to that particular cabinet - is there a way to create a container via command-line-fu with access control enabled to allow me to manually link it? I couldn't find the solution via search but it's late and I might've grabbed the wrong words. I suspect it's more of a Portainer-backend thing with mappings and such than a Docker Engine command line thing, in this case, and I'm content with "can't be done" - just making sure.

@deviantony
Copy link
Member

@daninfuchs we recently changed the default access control policy from public to administrators restricted. It will be part of the next release. Is this what you were asking for?

@codefaux
Copy link

No sir - in this case, since I have to manually create a container with Docker Engine command-line operations (a workaround since I want/need --link support) I was curious if there was a way to also enable Access Control on it within Portainer/Docker Engine/wherever that needs to happen, via CLI or other.

I can't "Duplicate/Edit" it using the webUI to turn on Access Control. When doing so, the container loses the --link parameter - or at least, so I assume, since it's specifically destroying and re-creating (or just creating anew) a container, using the information provided within its supported parsing/understanding of the Docker Engine API data, which presumably would not include --link configuration directives.

The Access Control issue I raise is only applicable in limited cases - around the context of needing to manually implement --link (or other unsupported configurations) via CLI, for containers that I would also prefer have Access Control enabled. I'm assuming the answer is "can't be done for now" and I'm okay with that.

@docfactory37
Copy link

Hi All, just like to know if this feature will be implamented, and is there and ETA?

ArrisLee pushed a commit that referenced this issue Jun 23, 2021
… a restricted container in Azure ACI EE-578 (#329)

Co-authored-by: Simon Meng <simon.meng@portainer.io>
@nexusguy59 nexusguy59 reopened this Oct 27, 2021
@portainer portainer locked and limited conversation to collaborators Jul 27, 2023
@jamescarppe jamescarppe converted this issue into discussion #9311 Jul 27, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

8 participants