diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c47d59a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM golang:1.8 + +WORKDIR /go/src/github.com/hashrocket/ws +COPY . . + + +RUN go get -d -v github.com/hashrocket/ws +RUN go install -v github.com/hashrocket/ws + +CMD ["/bin/bash"] diff --git a/README.md b/README.md index 5c21e1a..b730c08 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,20 @@ $ ws ws://localhost:3000/ws > ^D EOF ``` + +## Docker Usage + +Build Docker Image + +``` +$ docker build -t sldennis/ws . +``` + +Run Docker Image + +``` +$ docker run -it sldennis/ws +root@f762a8a163fd:/go/src/github.com/hashrocket/ws# ws ws://localhost:3000/ws +> {"type": "echo", "payload": "Hello, world"} +< {"type":"echo","payload":"Hello, world"} +```