Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Explain custom build and re-add ARM image reference
  • Loading branch information
RandomByte committed Feb 11, 2018
commit f180e56a88e405136089571a2a2b3effaa68753d
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,35 @@ $ docker service create \
```

## Supported architectures
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.

The main `dockersamples/visualizer` image supports **linux/amd64**.

**For ARM**, there is a pre-built image available. See [Running on ARM](#running-on-arm).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be more specific about "arm" - this works for armhf only, it won't work for 64-bit ARM such as that found on Packet's or Scaleway's servers or the Pine64 etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Done 👍


**For Windows**, there is a separate `Dockerfile.windows` and image. See [Running on Windows](#running-on-windows).

**Missing your architecture?** See [Building a custom image](#building-a-custom-image).

## Running on ARM

[@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.

```
$ docker service create \
--name=viz \
--publish=8080:8080/tcp \
--constraint=node.role==manager \
--mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
alexellis2/visualizer-arm:0.4
```

If you would like to build the image from source run the following command:

```
$ docker build -f Dockerfile -t visualizer-arm:latest .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can omit -f Dockerfile here.

```

[View on Docker Hub](https://hub.docker.com/r/alexellis2/visualizer-arm/tags/)

## Running on Windows

Expand Down Expand Up @@ -85,7 +113,21 @@ $ip=(Get-NetIPAddress -AddressFamily IPv4 `
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
```

TODO:
## Building a custom image
*When building for Windows, see [Running on Windows](#running-on-windows)*.

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:
```
$ docker build -f Dockerfile -t visualizer-custom:latest .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can omit -f Dockerfile here.

```

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:
```
$ docker run -it -d -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock visualizer-custom
```


## TODO:
* Take out or fix how dist works
* Comment much more extensively
* Create tests and make them work better
Expand Down