diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 deleted file mode 100644 index cf0ae5e..0000000 --- a/Dockerfile.aarch64 +++ /dev/null @@ -1,26 +0,0 @@ -FROM aarch64/node:4.6.0-slim - -WORKDIR /app - -# Only run npm install if these files change. -ADD ./package.json /app/package.json - -# Install dependencies -RUN npm install --unsafe-perm=true - -# Add the rest of the sources -ADD . /app - -# Build the app -RUN npm run dist - -# Number of milliseconds between polling requests. Default is 200. -ENV MS 200 - -EXPOSE 8080 - -RUN npm install - -HEALTHCHECK CMD node healthcheck.js || exit 1 - -CMD ["npm","start"] diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 new file mode 100644 index 0000000..475cff2 --- /dev/null +++ b/Dockerfile.arm64v8 @@ -0,0 +1,39 @@ +#Latest version of node tested on. +FROM arm64v8/node:8.12-alpine AS dist + +WORKDIR /app + +# Only run npm install if these files change. +ADD ./package.json /app/package.json + +# Install dependencies +RUN npm install + +# Add the rest of the sources +ADD . /app + +RUN npm run dist + + +FROM arm64v8/node:8.12-alpine + +WORKDIR /app +ADD ./cfg/* /app/cfg/ +ADD ./src/* /app/src/ +ADD ./create-index.js /app +ADD ./index.tpl /app +ADD ./server.js /app +ADD ./healthcheck.js /app +COPY --from=dist /app/dist/* /app/dist/ +COPY --from=dist /app/package.json /app/package.json +RUN npm install + +# MS : Number of milliseconds between polling requests. Default is 1000. +# CTX_ROOT : Context root of the application. Default is / +ENV MS=1000 CTX_ROOT=/ + +EXPOSE 8080 + +HEALTHCHECK CMD node /app/healthcheck.js || exit 1 + +CMD ["npm","start"] diff --git a/README.md b/README.md index 5854686..943a1b9 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,9 @@ $ docker service create \ ## 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. +### ARM32 + +[@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 1 and 2 (up to RPi2 version 1.1). ``` $ docker service create \ @@ -70,6 +72,21 @@ $ docker build -f Dockerfile.arm -t visualizer-arm:latest . [View on Docker Hub](https://hub.docker.com/r/alexellis2/visualizer-arm/tags/) +### ARM64 + +Similarly, [@ikluft](https://github.com/ikluft) pushed an image to Docker Hub as `ikluft/visualizer-arm64v8` for arm64v8 architecture machines such as the Raspberry Pi 3, as well as Raspberry Pi 2 version 1.2 (Oct 2016) and later. + +``` +$ 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 \ + ikluft/visualizer-arm64v8:latest +``` + +To rebuild the image or inspect the source it was made from see [its entry on Docker Hub](https://hub.docker.com/r/ikluft/visualizer-arm64v8/) or the [GitHub repo forked for this fix](https://github.com/ikluft/docker-swarm-visualizer). + ## Running on Windows [@StefanScherer](https://github.com/StefanScherer) has pushed an image to the @@ -98,7 +115,7 @@ docker run -d -p 8080:8080 -e DOCKER_HOST=${ip}:2375 --name=visualizer stefansch To work with a TLS secured Docker engine on Windows, set the environment variable `DOCKER_TLS_VERIFY` and bind mount the TLS certificates into the container. - + ``` $ip=(Get-NetIPAddress -AddressFamily IPv4 ` | Where-Object -FilterScript { $_.InterfaceAlias -Eq "vEthernet (HNS Internal NIC)" } `