You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-16Lines changed: 30 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,17 @@ The dockercraft project turns the official Minecraft client into a docker client
7
7
## What is it not?
8
8
voxel-dockerclient is not a serious tool for working with docker. It's a fun project (which may grow up to be a teaching aid someday).
9
9
10
-
> WARNING: Please use voxel-dockerclient on your local machine only.
11
-
> It currently doesn't support any authentication.
10
+
> WARNING: Please use voxel-dockerclient with care.
11
+
> It requires access to the docker socket.
12
12
13
13
## How to run voxel-dockerclient
14
+
### Try it on Play With Docker
15
+
The easiest way:
16
+
17
+
[](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/rajch/voxel-dockerclient/master/stack.yml)
18
+
14
19
### Using the docker image
15
-
The easiest way is to pull the docker image, and run from that. The steps are as follows:
20
+
The next easiest way is to pull the docker image, and run from that. The steps are as follows:
16
21
17
22
1. Pull the docker image with
18
23
@@ -23,30 +28,28 @@ The easiest way is to pull the docker image, and run from that. The steps are as
23
28
2. Run it with:
24
29
25
30
```
26
-
docker run -d -p 5000:80 -v /var/run/docker.sock:/var/run/docker.sock rajchaudhuri/voxel-dockerclient
31
+
docker run -d -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock rajchaudhuri/voxel-dockerclient
27
32
```
28
33
29
34
> The `-v /var/run/docker.sock:/var/run/docker.sock` is *very important*.
30
35
> This makes the UNIX socket, which the docker daemon listens to by default, available to the container.
31
36
> The container needs this to proxy a subset of the Docker remote API to voxel-dockerclient.
32
37
> If you leave this out by mistake, voxel-dockerclient will not work.
33
38
34
-
3. Point your browser to the container. If you run docker directly on your Linux machine, browse to: `http://localhost:5000`.
39
+
3. Point your browser to the container. If you run docker directly on your Linux machine, browse to: `http://localhost:8080`.
35
40
If you use docker-machine (for example, with the Docker Toolbox on Windows), find the IP address of your docker machine with
36
41
37
42
```
38
43
docker-machine ip default
39
44
```
40
-
and then browse to that IP address using the port that you mapped in step 2. E.g.: `http://192.17.22.1:5000`
45
+
and then browse to that IP address using the port that you mapped in step 2. E.g.: `http://192.17.22.1:8080`
41
46
42
47
### Building with node.js and golang
43
-
Alternatively, if you have node.js and golang installed on your docker host, you can clone the github repository, and build and run voxel-dockerclient yourself. The steps are:
48
+
Alternatively, if you have node.js (>=v12.19.0) and golang (>=go1.16.4) installed on your docker host, you can clone the github repository, and build and run voxel-dockerclient yourself. The steps are:
44
49
45
50
1. Clone the github repository into your Go workspace with:
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 8081:80 voxel-dockerclient:local
90
+
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 voxel-dockerclient:local
91
+
```
92
+
4. Browse to `http://localhost:8080`
93
+
94
+
Or, you could use the provided docker compose manifest file, by running:
95
+
96
+
```
97
+
docker-compose up -d
83
98
```
84
-
4. Browse to `http://localhost:8081`
85
99
86
100
Your logged-in user needs to be a member of the `docker` group for this to work.
87
101
88
102
## How to use voxel-dockerclient
89
103
Instructions are available [here](https://rajch.github.io/voxel-dockerclient/).
90
104
91
105
## Browser compatibility
92
-
voxel-dockerclient has been tested using recent Chrome and Firefox browsers, on Linux and Windows. Regrettably (*I mean it. I actually like that old browser*), it does not work with Internet Explorer.
106
+
voxel-dockerclient has been tested using recent Chrome and Firefox browsers, on Linux and Windows.
93
107
94
108
## What's next?
95
109
I intend to add the following capabilities quickly:
96
110
*~~`docker logs` equivalent~~** DONE
97
111
*~~`docker attach` equivalent~~** DONE
98
112
*`docker pull` equivalent
99
113
* A better interface for the `create` command
100
-
**Some* security
114
+
*~~*Some* security~~** DONE
101
115
102
116
In the pipeline, further down, are:
103
117
* volumes
@@ -109,7 +123,7 @@ I don't really know how far I want to take this. I do want voxel-dockerclient to
109
123
## How does it work?
110
124
~~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.
111
125
The voxel-dockerclient server is simply nginx, proxying the docker daemon's UNIX socket.~~
112
-
The voxel-dockerclient server is a tiny golang program, which serves the client HTML/CSS/javascript, and provides a proxy for the docker API. At the moment, it proxies the full API with no authorization. This will change.
126
+
The voxel-dockerclient server is a tiny golang program, which serves the client HTML/CSS/javascript, and provides a proxy for the docker API. At the moment, it proxies the full API with ~~no~~ some authorization. ~~This will change.~~
113
127
114
128
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.
115
129
@@ -123,4 +137,4 @@ I would like to thank:
123
137
* The fine folk of @docker, for Docker
124
138
* The fine folk behind the voxeljs family of modules. @github/maxogden, @github/kumavis, @github/deathcap, @github/substack et al. These are really nice.
125
139
* The authors of the dockerode and axios modules, although I'm not using dockerode any more.
126
-
* My partner, Chitra Raghavan, for contributing the player model, testing, and bearing with me while I was building this
140
+
* My partner, Chitra Raghavan (@github/chitradoc), for contributing the player model, testing, and bearing with me while I was building this
0 commit comments