-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
PODMAN_HOST should match DOCKER_HOST uri format #4156
Comments
we have similar environment variables just not called DOCKER_HOST or PODMAN_HOST. Is the actual name required here? |
The question I would have is, would the use of a URI be easier for users to descover then a bunch of different Environment variables. |
I think that a single URI variable provides more flexibility and is also more future proof. When using multiple variables there is always the need to introduce new ones,... like add protocol, add SSL escpace options, .... --- this is why I think an URI is more appropriate (not to mention that it does not clutter the user env). Switching credentials is would be just one set instead on N-sets-unsets. I think that docker did the same thing initially where DOCKER_HOST was only the hostname but later they realized that they need more and upgraded it. There is no special requirement for using proposed name, you are free to use PODMAN_URI or whatever think is more appropriate. I would like to have the time to make the PR myself but I am afraid I am overloaded till December, at least. Maybe someone else can step in. |
Setting DOCKER_HOST assumes that it will talk the docker protocol, while it will be varlink... And we have already used PODMAN_HOST for the hostname (sans scheme and username) See #1824
|
Ok, this is already implemented with Podman. The environment variable is
The URI only supports the socket language right now but could possibly be expanded. The complimentary environment variable is the I think it could be possible to make the URI honor ssh but it is nowhere near a priority right now so help fromt he community would be appreciated. |
What do you think about #4161 ? Still can't get PODMAN_VARLINK_BRIDGE to work interactively. $ eval $(podman-machine env --varlink)
$ podman-remote run -it busybox
Error: client must use upgraded connection to attach However, using the patched $ eval $(podman-machine env)
$ ./bin/podman-remote run -it busybox
/ # EDIT: I was trying to write "bridge", but ended up writing "address". Duh 🤦♂️ |
Here is the comparison of environment variables, between export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/home/anders/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval $(docker-machine env) export PODMAN_USER="root"
export PODMAN_HOST="127.0.0.1"
export PODMAN_PORT="38053"
export PODMAN_IDENTITY_FILE="/home/anders/.local/machine/machines/box/id_rsa"
export PODMAN_IGNORE_HOSTS="true"
export PODMAN_MACHINE_NAME="box"
# Run this command to configure your shell:
# eval $(podman-machine env) It would be possible to add a PODMAN_URI, but I don't think varlink (nor ssh) supports |
@ssbarnea : are you OK with using two variables instead of one ? PODMAN_USER/PODMAN_HOST |
Actually it's two variables: |
That sounds about right. I'm not sure if you are supposed to use $ ssh -L 127.0.0.1:1234:/run/podman/io.podman root@remotehost
$ PODMAN_VARLINK_ADDRESS="tcp:127.0.0.1:1234" bin/podman-remote images |
I think
Or maybe to introduce a new variable like |
This issue had no activity for 30 days. In the absence of activity or the "do-not-close" label, the issue will be automatically closed within 7 days. |
So, is it possible to have one variable for remote connection configuration like it's in docker? |
Should be trivial to add yet another variable, and parse it as a fallback. |
@afbjorklund or @ssbarnea could you open a PR for this feature? |
I need all 4 variables (for podman-machine) so adding another one does not help me (need port and key) |
This issue had no activity for 30 days. In the absence of activity or the "do-not-close" label, the issue will be automatically closed within 7 days. |
@ssbarnea Are you still interested in this one? |
DOCKER_HOST
can also be used with URIs to define exactly how to connect to a host, likeDOCKER_HOST=ssh://root@address
.This feature is key for providing a good user experience because it allows users to use the tool without having to modify CLI arguments or API calls (docker-py loads it implicitely) in scripts/tools.
This was initially described in #2276 which was closed, even if it was not really implemented.
The text was updated successfully, but these errors were encountered: