Skip to content

Commit 5a5edf5

Browse files
committed
Updated README and docs
1 parent 29e86f2 commit 5a5edf5

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The easiest way is to pull the docker image, and run from that. The steps are as
4141
and then browse to that IP address using the port that you mapped in step 2. E.g.: `http://192.17.22.1:5000`
4242

4343
### Running with node.js
44-
Alternatively, if you have node.js installed on your docker host, you can clone the github repository, and run voxel-dockerclient yourself. The steps are:
44+
Alternatively, if you have node.js installed on your docker host, you can clone the github repository, and build and run voxel-dockerclient yourself. The steps are:
4545

4646
1. Clone the github repository with
4747

@@ -56,7 +56,8 @@ Alternatively, if you have node.js installed on your docker host, you can clone
5656
3. Run
5757

5858
```
59-
npm start
59+
npm run build-all
60+
npm run run-docker
6061
```
6162
4. Browse to `http://localhost:8080`
6263

@@ -69,8 +70,8 @@ voxel-dockerclient has been tested using recent Chrome and Firefox browsers, on
6970

7071
## What's next?
7172
I intend to add the following capabilities quickly:
72-
* `docker logs` equivalent
73-
* `docker attach` equivalent
73+
* ~~`docker logs` equivalent~~ ** DONE
74+
* ~~`docker attach` equivalent~~ ** DONE
7475
* `docker pull` equivalent
7576
* A better interface for the `create` command
7677
* *Some* security
@@ -83,18 +84,19 @@ In the pipeline, further down, are:
8384
I don't really know how far I want to take this. I do want voxel-dockerclient to be complete, but I want to keep it simple. I may turn it into a teaching tool eventually.
8485

8586
## How does it work?
86-
On the server, voxel-dockerclient uses [Express](http://expressjs.com/) and the excellent [dockerode](https://github.com/apocas/dockerode) node module to provide a proxy for a subset of the Docker remote API.
87+
~~On the server, voxel-dockerclient uses [Express](http://expressjs.com/) and the excellent [dockerode](https://github.com/apocas/dockerode) node module to provide a proxy for a subset of the Docker remote API.~~
88+
The voxel-dockerclient server is simply nginx, proxying the docker daemon's UNIX socket. At the moment, it proxies the full API with no authorization. This will change.
8789

8890
On the client, it uses the brilliant [voxeljs](http://voxeljs.com/) family of node modules to render the UI, and the [axios](https://github.com/mzabriskie/axios) node module to communicate with the proxied API.
8991

90-
I am using an older flavour of the main voxeljs module, voxel-engine. I had to fork it because of some incompatibilities with later modules. The original is [here](https://github.com/maxogden/voxel-engine), and my forked version [here](https://github.com/rajch/voxel-engine).
92+
I have used an older flavour of the main voxeljs module, voxel-engine. I had to fork it because of some incompatibilities with later modules. The original is [here](https://github.com/maxogden/voxel-engine), and my forked version [here](https://github.com/rajch/voxel-engine).
9193
The same treatment had to be given for a voxeljs plugin called voxel-keys. The original is [here](https://github.com/voxel/voxel-keys), and my fork [here](https://github.com/rajch/voxel-keys).
9294

9395
The code is open source, under the MIT license. I would love contribution, in the form of issue reporting, feature requests, pull requests, anything.
9496

9597
## Acknowledgements
9698
I would like to thank:
97-
* The fine folk of Docker, for Docker
98-
* The fine folk behind the voxeljs family of modules. github/maxogden, github/kumavis, github/deathcap, github/substack et al. These are really nice.
99-
* The authors of the dockerode and axios modules
99+
* The fine folk of @docker, for Docker
100+
* The fine folk behind the voxeljs family of modules. @github/maxogden, @github/kumavis, @github/deathcap, @github/substack et al. These are really nice.
101+
* The authors of the dockerode and axios modules, although I'm not using dockerode any more.
100102
* My partner, Chitra Raghavan, for contributing the player model, testing, and bearing with me while I was building this

docs/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Open the command console, and try the commands. Currently, the following command
2525
|top|Shows processes running in a container|
2626
|start|Starts a container|
2727
|stop|Stops a container|
28+
|logs|Shows a container's logs|
29+
|attach|Attaches a terminal to an interactive container|
2830
|go|Takes player to a container, or to the first or last container. Type go home if you get lost.|
2931
|remove|Deletes a container|
3032
|create|Creates a container|
@@ -43,3 +45,6 @@ Activity performed in other clients, such as the official docker client, will no
4345

4446
The `go` command can be used to teleport the player to a particular container, using the syntax `go <containername>`. `go home` will teleport to the first (oldest) container. `go nextslot` will teleport to the spot where the next new container will appear.
4547

48+
The `logs` command shows a container's logs, if available.
49+
50+
The `attach` command opens a terminal attached to the main process of a container. You can press Ctrl+L to refresh the terminal, and Ctrl+P, Ctrl+Q to detach the terminal.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"build-public": "copyfiles -f node_modules/xterm/dist/xterm.js public/js && copyfiles -f node_modules/xterm/dist/xterm.css public/css",
99
"build-debug": "browserify --debug client/main.js -o public/js/client.js",
10-
"build-docker": "docker build -t vdclient .",
11-
"build-all": "npm run build-debug && npm run build-docker",
12-
"run-docker": "docker run --rm --name vdc1 -h vdc1 -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 vdclient"
10+
"build-docker": "docker build -t voxel-dockerclient .",
11+
"build-all": "npm run build-public && npm run build-debug && npm run build-docker",
12+
"run-docker": "docker run --rm --name vdc1 -h vdc1 -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 voxel-dockerclient"
1313
},
1414
"repository": {
1515
"type": "git",

0 commit comments

Comments
 (0)