Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
It doesn't work when configure detachKey in ~/.docker/config.json.
Version-Release number of selected component (if applicable):
docker-latest-1.10.3-21.el7.x86_64
How reproducible:
Steps to Reproduce:
1. configure detachKey in ~/.docker/config.json
2. run a container in background
3. attach above running container w/ --config option
Actual results:
# cat ~/.docker/config.json
{
"detachKey": "ctrl-e,e"
}
# docker-latest run -itd docker.io/fedora:23 /bin/sh
28c0f37f95fd943221bcedb9dd7fe2250ffd585b18bbae2a8c5760ef2a82550d
# docker-latest --config=~/.docker/ attach 28c0f37f95fd943221bcedb9dd7fe2250ffd585b18bbae2a8c5760ef2a82550d
^e
NOTE: the container can't be detached.
Expected results:
Additional info:
In addition, there are questions in man page of docker-latest {run, start, exec, attach}.
1. '\\' is eaten in section --detach-keys of man page of docker-latest-{run, start, exec, attach}
2. no mentioned A-Z.
# man docker-latest-run|grep Override
Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _.
3. it seems 'shift+<character>' also works
could you paste the content of ~/.docker/config.json? from your description it seems you're using 'detachKey' where instead you have to use 'detachKeys' (you're missing an 's')
(In reply to Antonio Murdaca from comment #2)
> could you paste the content of ~/.docker/config.json? from your description
> it seems you're using 'detachKey' where instead you have to use 'detachKeys'
> (you're missing an 's')
alright you already pasted it. Indeed you're missing an 's' (it's 'detachKeys')
I can reproduce a bug which is related to --config though
could you please try to omit --config and see if it works for you? because for me works fine.
The problem here lies in the way flags and shell expansion is parsed:
Examples
if you do '--config ~/.docker/' everything works
if you do '--config=~/.docker/' everything does not work
if you do '--config="~/.docker/"' everything does not work
if you do '--config='~/.docker/'' everything does not work
So possibly we could try to deal with this upstream but I'm not sure it's doable.
the fix is to either remove the '=' so the shell can expand '~' or use an absolute path.
Antonio In your examples, this is just the way that shell expansion works. Nothing to do with docker. The docker client gets the expansion from the shell, docker should not do anything about it.
In stead of using docker, use echo
echo '--config ~/.docker/'
--config ~/.docker/
echo --config ~/.docker/
--config /home/dwalsh/.docker/
echo --config= ~/.docker/
--config= /home/dwalsh/.docker/
echo --config = ~/.docker/
--config = /home/dwalsh/.docker/
...
Docker should not be expected to expand shell short cuts.
This should be closed as a not a bug
(In reply to Daniel Walsh from comment #7)
> Antonio In your examples, this is just the way that shell expansion works.
> Nothing to do with docker. The docker client gets the expansion from the
> shell, docker should not do anything about it.
>
Daniel, I think it will be better if we can document this for users.
In addition, I also mentioned some document issues in Section Additional info, because it's trivial, I haven't file a separated bug.
Description of problem: It doesn't work when configure detachKey in ~/.docker/config.json. Version-Release number of selected component (if applicable): docker-latest-1.10.3-21.el7.x86_64 How reproducible: Steps to Reproduce: 1. configure detachKey in ~/.docker/config.json 2. run a container in background 3. attach above running container w/ --config option Actual results: # cat ~/.docker/config.json { "detachKey": "ctrl-e,e" } # docker-latest run -itd docker.io/fedora:23 /bin/sh 28c0f37f95fd943221bcedb9dd7fe2250ffd585b18bbae2a8c5760ef2a82550d # docker-latest --config=~/.docker/ attach 28c0f37f95fd943221bcedb9dd7fe2250ffd585b18bbae2a8c5760ef2a82550d ^e NOTE: the container can't be detached. Expected results: Additional info: In addition, there are questions in man page of docker-latest {run, start, exec, attach}. 1. '\\' is eaten in section --detach-keys of man page of docker-latest-{run, start, exec, attach} 2. no mentioned A-Z. # man docker-latest-run|grep Override Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _. 3. it seems 'shift+<character>' also works