Skip to content

Commit 5df2f52

Browse files
committed
Explain custom build and re-add ARM image reference
1 parent 3d28a24 commit 5df2f52

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

README.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,33 @@ $ docker service create \
4646
```
4747

4848
## Supported architectures
49-
The main image is based on [node:8-alpine](https://hub.docker.com/_/node/). With that it already offers support for many architectures, including ARM (so it can run on your Raspberry Pi). See below for instructions on how to run on Windows.
49+
50+
The main `dockersamples/visualizer` image supports **linux/amd64**.
51+
52+
**For ARM**, there is a pre-built image available. See [Running on ARM](#running-on-arm).
53+
54+
**For Windows**, there is a separate `Dockerfile.windows` and image. See [Running on Windows](#running-on-windows).
55+
56+
**Missing your architecture?** See [Building a custom image](#building-a-custom-image).
57+
58+
## Running on ARM
59+
60+
[@alexellisuk](https://twitter.com/alexellisuk) has pushed an image to the Docker Hub as `alexellis2/visualizer-arm:latest` it will run the code on an ARMv6 or ARMv7 device such as the Raspberry Pi.
61+
62+
```
63+
$ docker service create \
64+
--name=viz \
65+
--publish=8080:8080/tcp \
66+
--constraint=node.role==manager \
67+
--mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
68+
alexellis2/visualizer-arm:0.4
69+
```
70+
71+
If you would like to build the image from source run the following command:
72+
73+
```
74+
$ docker build -f Dockerfile -t visualizer-arm:latest .
75+
```
5076

5177
## Running on Windows
5278

@@ -85,7 +111,21 @@ $ip=(Get-NetIPAddress -AddressFamily IPv4 `
85111
docker run -d -p 8080:8080 -e DOCKER_HOST=${ip}:2376 -e DOCKER_TLS_VERIFY=1 -v "$env:USERPROFILE\.docker:C:\Users\ContainerAdministrator\.docker" --name=visualizer stefanscherer/visualizer-windows
86112
```
87113

88-
TODO:
114+
## Building a custom image
115+
*When building for Windows, see [Running on Windows](#running-on-windows)*.
116+
117+
To build an up-to-date image for any architecture supported by [node:8-alpine](https://hub.docker.com/_/node/) (currently `amd64`, `arm32v6`, `arm32v7`, `arm64v8`, `i386`, `ppc64le` and `s390x`), execute the following command on a device of your target architecture:
118+
```
119+
$ docker build -f Dockerfile -t visualizer-custom:latest .
120+
```
121+
122+
Afterwards you can start visualizer by using any of the commands stated [above](#docker-swarm-visualizer). Just replace `dockersamples/visualizer` with `visualizer-custom`. For example:
123+
```
124+
$ docker run -it -d -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock visualizer-custom
125+
```
126+
127+
128+
## TODO:
89129
* Take out or fix how dist works
90130
* Comment much more extensively
91131
* Create tests and make them work better

0 commit comments

Comments
 (0)