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

Disable PTY when working with docker init script #117

Merged
merged 1 commit into from Jan 19, 2015
Merged

Disable PTY when working with docker init script #117

merged 1 commit into from Jan 19, 2015

Conversation

Ichimonji10
Copy link
Contributor

Docker has a non-standard approach to daemonizing: docker -d stays in the
foreground, rather than forking in to the background. This, combined with the
naive init script distributed with docker, can cause commands like ssh -t user@host service docker restart to silently fail. For more information, see:

Docker has a non-standard approach to daemonizing: `docker -d` stays in the
foreground, rather than forking in to the background. This, combined with the
naive init script distributed with docker, can cause commands like `ssh -t
user@host service docker restart` to silently fail. For more information, see:

* fabric/fabric#395 (comment)
* fabric/fabric#395 (comment)
* moby/moby#2758
@JacobCallahan
Copy link
Member

ACK

@Ichimonji10
Copy link
Contributor Author

>>> from fabric.api import run
>>> run('service docker restart', pty=False)
No hosts found. Please specify (single) host string for connection: root@<snip>
[root@<snip>] run: service docker restart
[root@<snip>] Login password for 'root': 
[root@<snip>] out: Stopping docker: [  OK  ]
[root@<snip>] out: Starting docker:       [  OK  ]
[root@<snip>] out: 

'Stopping docker: [  OK  ]\r\nStarting docker:\t[  OK  ]'
>>> run('service docker status && docker ps')
[root@<snip>] run: service docker status && docker ps
[root@<snip>] out: docker (pid  18494) is running...
[root@<snip>] out: CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@<snip>] out: 

'docker (pid  18494) is running...\r\nCONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES'

@elyezer
Copy link
Contributor

elyezer commented Jan 19, 2015

ACK

elyezer added a commit that referenced this pull request Jan 19, 2015
Disable PTY when working with docker init script
@elyezer elyezer merged commit 4291f62 into SatelliteQE:master Jan 19, 2015
@Ichimonji10 Ichimonji10 deleted the ssh-nopty branch February 9, 2015 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants