Bug 1216265 - docker exec -it bash cannot start a shell session
Summary: docker exec -it bash cannot start a shell session
Keywords:
Status: CLOSED DUPLICATE of bug 1221379
Alias: None
Product: Fedora
Classification: Fedora
Component: docker
Version: 22
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1226374 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-29 00:36 UTC by robberphex
Modified: 2015-06-02 18:17 UTC (History)
18 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-06-02 18:17:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description robberphex 2015-04-29 00:36:47 UTC
Description of problem:

`docker exec -it <name> /bin/bash` cannot work

Version-Release number of selected component (if applicable):

$ uname -a
Linux rp.fedora 4.0.0-0.rc5.git4.1.fc22.x86_64 #1 SMP Fri Mar 27 13:51:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ sudo docker version
Client version: 1.6.0
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 0591dce/1.6.0
OS/Arch (client): linux/amd64
Server version: 1.6.0
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 0591dce/1.6.0
OS/Arch (server): linux/amd64

How reproducible:

Steps to Reproduce:
1. `sudo docker run --name some-nginx -d nginx:1.7`
2. `sudo docker exec -it some-nginx /bin/bash`

Actual results:
<no output>

Expected results:

start a bash session

Additional info:
`sudo docker exec -it some-nginx echo hello` also have no ouput.
but `sudo docker exec some-nginx echo hello` get the output('hello').

Comment 1 Daniel Walsh 2015-04-29 12:07:58 UTC
Lokesh can you verify this bug?

Comment 2 M. Edward (Ed) Borasky 2015-05-31 18:22:01 UTC
I have this too - it's some kind of privilege / permissions issue. If you add '--privileged' to the 'docker run' command it works on my machine:

# docker run -d docker.io/fedora:22 sleep infinity
4972ffef18962f5efea1d01788893434e49816c15168bc8749bca4e4e39c5a1a
# docker exec -it 4972ffef18962f5efea1d01788893434e49816c15168bc8749bca4e4e39c5a1a /bin/bash

goes to host root prompt, but

# docker run -d --privileged docker.io/fedora:22 sleep infinity
a571ab4f15fe1c05f03861e4995f364c2a080854b9aa66312075f3487aa9a798
# docker exec -it a571ab4f15fe1c05f03861e4995f364c2a080854b9aa66312075f3487aa9a798 /bin/bash

gives me a prompt inside the container:
[root@a571ab4f15fe /]#

Comment 3 M. Edward (Ed) Borasky 2015-05-31 22:25:45 UTC
This might be a duplicate of Bug 1226374

Comment 4 Daniel Walsh 2015-06-01 12:45:47 UTC
*** Bug 1226374 has been marked as a duplicate of this bug. ***

Comment 5 Daniel Walsh 2015-06-02 18:17:17 UTC
This should be fixed by an updated docker-selinux package in docker-1.6.2

*** This bug has been marked as a duplicate of bug 1221379 ***


Note You need to log in before you can comment on or make changes to this bug.