docker-ws-client

command module
v0.0.0-...-2827980 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2015 License: GPL-3.0 Imports: 5 Imported by: 0

README

Docker Remote Attch Use Websocket

This is a simple example of docker remote attach use websocket protocol.

Install

go get github.com/hangyan/docker-ws-client

Usage

The first argument is the container id,and second is the command you want to execute in that container

Notes

  1. The server will write back the command you send ,then the result,the last line is the bash promt.
  2. The commands that has stream output may interfere with the later command's output,like top,ping,so you need to restart the container after you execute these commands.

Others

You can also use a web browser to act as a websocket client too,there is a chrome extension can do this : Simple Websocket Client

Notes:

  1. You shoud add linebreak after the command
  2. the example's (ls -al) output has some strange chars,they are the terminal's color control character.
  3. Don't use logs=1 ,or the output will be messed up.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL