Guillaume J. Charmes
2e6a5bc7ee
Update README with escape sequence
2013-04-09 12:55:26 -07:00
Guillaume J. Charmes
72cef46e5e
Fix merge issue
2013-04-09 12:55:26 -07:00
Guillaume J. Charmes
626bfd87a7
Use integers instead of non-printable chars in the escape sequence detection
2013-04-09 12:55:26 -07:00
Guillaume J. Charmes
8f41f1fa60
Remove unused optimization that could lead in loosing the escape sequence
2013-04-09 12:55:26 -07:00
Guillaume J. Charmes
faa8843650
Look for the escape sequence only in tty mode
2013-04-09 12:55:17 -07:00
Guillaume J. Charmes
1f70b1e15d
Implement an escape sequence in order to be able to detach from a container
2013-04-09 11:06:17 -07:00
Guillaume J. Charmes
3f63b87807
Disable signal catching and enable real posix raw mode
2013-04-09 11:06:17 -07:00
Solomon Hykes
9c3d2b6a4e
Merge branch 'master' of ssh://github.com/dotcloud/docker
2013-04-09 11:02:43 -07:00
Solomon Hykes
1716fccbcc
Merge remote-tracking branch 'origin/change_run_detach_behavious_tty_mode'
2013-04-09 10:39:13 -07:00
Solomon Hykes
9043e4c757
Merge pull request #363 from dhrp/docs
...
Added code and color for 'note' and updated the examples note.
2013-04-09 10:36:44 -07:00
Solomon Hykes
2e9a73c5d8
Merge remote-tracking branch 'origin/fix_flush_behaviour'
2013-04-09 10:31:56 -07:00
Guillaume J. Charmes
1eaaa6b744
Flush stdout on import to avoid deadklock when waiting for stdin (import -). Fixed #365
2013-04-09 10:02:57 -07:00
Guillaume J. Charmes
cb54e9c659
Flush whether or not there we set the rawmode to avoid the client to lock
2013-04-09 09:59:30 -07:00
Guillaume J. Charmes
7c2b085d1a
Add inconditionnal lock in Start/Stop/Kill to avoid races
2013-04-09 09:09:54 -07:00
Guillaume J. Charmes
d063d52cce
Update the unit test to reflect the new CmdRun behaviour in tty mode
2013-04-09 08:18:36 -07:00
Guillaume J. Charmes
64c1b6d9cd
Change the behaviour of CmdRun in tty mode: dont kill the process uppon detach
2013-04-09 08:18:16 -07:00
Guillaume J. Charmes
329f4449dc
Remove the mutexes and use chan instead in order to handle the wait lock
2013-04-09 07:57:59 -07:00
Solomon Hykes
0767916ade
Merge pull request #346 from srid/patch-2
...
make the service example work
2013-04-08 22:12:34 -07:00
Solomon Hykes
10923c7890
Merge remote-tracking branch 'origin/pty_fix-1'
2013-04-08 21:12:22 -07:00
Thatcher Peskens
2832ea0cfe
Added code and color for 'note' and updated the hello world note.
2013-04-08 20:10:47 -07:00
Solomon Hykes
a7299a3f26
Merge remote-tracking branch 'origin/unit_test_improvment-2'
2013-04-08 18:29:12 -07:00
Solomon Hykes
1601366cb6
Make it more clear when Docker fails to allocate a free IP range for its bridge
2013-04-08 18:16:58 -07:00
Louis Opter
e9a68801ba
Update the tests according to the "optional raw mode" changes
2013-04-08 16:07:12 -07:00
Guillaume J. Charmes
f73401fb9a
Add missing file
2013-04-08 16:07:12 -07:00
Guillaume J. Charmes
dcf4572a69
Set the raw mode only for tty enabled containers
2013-04-08 16:07:12 -07:00
Guillaume J. Charmes
d530d581f7
Make commands.go more idiomatic. Use DockerConn only when needed, keep io.Writer when not
2013-04-08 15:58:09 -07:00
Guillaume J. Charmes
bdf05d8368
Reenable CmdRunAttachStdin and CmdRunHostname now using the DockConn interface
2013-04-08 15:58:09 -07:00
Guillaume J. Charmes
b71b226cc1
Improve error management (avoid unwanted output in tests)
2013-04-08 15:58:09 -07:00
Guillaume J. Charmes
80f6b4587b
Edit the tests for them to use the new command API. Disable TestRunHostname and TestAttachStdin.
2013-04-08 15:58:09 -07:00
Guillaume J. Charmes
e6e9c1cd62
Use io.WriteCloser instead of *os.File in DockerLocalConn so we can use it with standard writers and pipes
2013-04-08 15:58:09 -07:00
Guillaume J. Charmes
246eed52de
Move DockerLocalConn and terminal functions form package "main" to "rcli" in order to be able to use DockerLocalConn in commands_test.go
2013-04-08 15:58:09 -07:00
Louis Opter
b306a60738
Simplification in the goroutine that restore the terminal state on SIGINT
2013-04-08 15:58:09 -07:00
Louis Opter
7d0ab3858e
Only set the terminal in raw mode for commands which need it
...
The raw mode is actually only needed when you attach to a container.
Having it enabled all the time can be a pain, e.g: if docker crashes
your terminal will end up in a broken state.
Since we are currently missing a real API for the docker daemon to
negotiate this kind of options, this changeset actually enable the raw
mode on the login (because it outputs a password), run and attach
commands.
This "optional raw mode" is implemented by passing a more complicated
interface than io.Writer as the stdout argument of each command. This
interface (DockerConn) exposes a method which allows the command to set
the terminal in raw mode or not.
Finally, the code added by this changeset will be deprecated by a real
API for the docker daemon.
2013-04-08 15:58:09 -07:00
Louis Opter
4e5001b46a
Remove the unused http transport from rcli
2013-04-08 15:58:09 -07:00
Solomon Hykes
b8f9803459
Merge pull request #347 from kencochrane/303_docs_fix
...
improved the example docs to help #303
2013-04-08 11:50:07 -07:00
Solomon Hykes
0c018d3697
Merge pull request #356 from flavio/improve_python_web_app_example
...
Extend the documentation covering the web app example
2013-04-08 11:49:17 -07:00
Flavio Castelli
72fdb41069
Extend the documentation covering the web app example
...
Make it clear how to access the web app running inside of the container
from the host.
2013-04-08 17:39:30 +02:00
Ken Cochrane
6eb8a74ff9
added headers to examples linking back to running the examples page
2013-04-07 10:23:00 -04:00
Ken Cochrane
81ebf4fcf6
made a new running the examples page, and added a link to the top of each example to the page to show people how to run them.
2013-04-07 10:21:08 -04:00
Sridhar Ratnakumar
9875a9b1f1
sync with README
2013-04-07 00:43:57 -07:00
Sridhar Ratnakumar
27feba4594
make the service example work
...
issue #98 requires connecting to localhost (which `hostname` may resolve to) will not work.
2013-04-07 00:41:24 -07:00
Guillaume J. Charmes
c83393a541
Move the DockerConn flush to its own function
2013-04-05 20:08:31 -07:00
Guillaume J. Charmes
7e1e7d14fa
Make sure to flush buffer when setting raw mode
2013-04-05 19:48:49 -07:00
Guillaume J. Charmes
99b5bec069
Fix run disconnect behavious in tty mode + add unit test to enforce it
2013-04-05 19:02:35 -07:00
Guillaume J. Charmes
7d8895545e
Cleanup pty variable names
2013-04-05 17:40:55 -07:00
Guillaume J. Charmes
33a5fe3bd4
Make sure the process start in his own session and grabs the terminal
2013-04-05 17:40:55 -07:00
Guillaume J. Charmes
847a8f45a4
Merge the 3 ptys in 1
2013-04-05 17:40:55 -07:00
Solomon Hykes
8cf30395a1
Changed default bridge interface do 'docker0'
2013-04-05 14:16:19 -07:00
Solomon Hykes
22adb52c0a
The flag to use a pre-existing bridge interface is '-b'. Added explanation
2013-04-05 14:16:04 -07:00
Solomon Hykes
793c1ad990
Merge remote-tracking branch 'origin/219-default-bridge-2'
2013-04-05 14:02:16 -07:00