-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need a proper ARM build #30
Comments
Here's a snippet from my old project that builds multiarch You'd likely need that in the end but there's still the first problem of ensuring you have a multi-arch base for tini. This one shows a way of doing it https://github.com/instructure/dockerfiles/blob/master/tini/v0.19.0/Dockerfile |
We are using We should probably just change the docker push workflow and Lego installation. |
If we follow the same pattern as that |
I have added support for I also tried adding support for |
Tried it's on a restart loop. Error 143 |
This can be a Is there any related log in the |
I did --no-healthcheck it just stops after a while.
…________________________________
From: 'Mohammad-Mohsen Aseman-Manzar' via Open Source Development ***@***.***>
Sent: Thursday, October 26, 2023 10:16 AM
To: mohsenasm/swarm-dashboard ***@***.***>
Cc: Archimedes Trajano ***@***.***>; Author ***@***.***>
Subject: Re: [mohsenasm/swarm-dashboard] Need a proper ARM build (Issue #30)
This can be a healthcheck issue.
I temporarily disabled the healthcheck to see if it is the case.
Is there any related log in the docker service logs or docker container inspect <container_id>?
—
Reply to this email directly, view it on GitHub<#30 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAA3AI7Y5TZOY6GTLCY5PJLYBJWEDAVCNFSM6AAAAAA6KODZLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGIZDENZYGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
|
Building on the pi
|
The result of this stage is only a client-side js file, which is platform-independent. So, we don't need to build it in arm and I forced the Elm build stage to only use amd64 in the Dockerfile. If you want to build on the Raspberry Pi, you can pass this issue by copying file Another question, Does the dashboard work normally before it stops? I think we should investigate what causes error code 143, maybe from the stopped container's version: "3"
services:
swarm-dashboard:
image: mohsenasm/swarm-dashboard:dev_multiarch
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 8080:8080
environment:
PORT: 8080
ENABLE_AUTHENTICATION: "false"
ENABLE_HTTPS: "false"
DOCKER_UPDATE_INTERVAL: 15000
deploy:
placement:
constraints:
- node.role == manager |
It won't open up the port for me so nothing is listening. I guess Elm won't have an ARM specific build anytime soon so this block may be needed to build a platform specific elm # syntax=docker/dockerfile:1-labs
FROM debian:bullseye AS elm
RUN --mount=type=cache,target=/var/cache/apt \
apt-get update && \
apt-get install -y build-essential \
automake \
autotools-dev \
make \
g++ \
ca-certificates \
software-properties-common \
apt-transport-https \
lsb-base \
lsb-release \
zlib1g-dev \
libpcre3-dev \
libcurl4-openssl-dev \
libc-dev \
libxml2-dev \
libsnmp-dev \
libssh2-1-dev \
libevent-dev \
libopenipmi-dev \
libpng-dev \
pkg-config \
libfontconfig1 \
git \
bzip2 \
zip \
unzip \
musl-dev \
ghc \
cabal-install \
libmpfr-dev
ADD --keep-git-dir=true https://github.com/elm/compiler.git#0.19.1 /w/compiler
WORKDIR /w/compiler
RUN rm worker/elm.cabal
RUN cabal new-update
RUN cabal new-configure
RUN cabal new-build Unfortunately the binary that this provides is 0.19.1 which apparently does not support the commands used in 0.18.0 so that won't help. |
Elm is no issue here. It only produces the Here is the file: index.js.zip if you want to build the image on the pi, download and unpack index.js.zip into FROM node:20-alpine AS base
RUN apk add --update tini lego curl && rm -r /var/cache
ENTRYPOINT ["/sbin/tini", "--"]
WORKDIR /home/node/app
FROM base AS dependencies
ENV NODE_ENV production
COPY package.json yarn.lock ./
RUN yarn install --production
FROM base AS release
WORKDIR /home/node/app
ENV LEGO_PATH=/lego-files
COPY --from=dependencies /home/node/app/node_modules node_modules
COPY ./elm-client/client client
COPY server server
COPY server.sh server.sh
COPY healthcheck.sh healthcheck.sh
COPY crontab /var/spool/cron/crontabs/root
ENV PORT=8080
# HEALTHCHECK --interval=60s --timeout=30s \
# CMD sh healthcheck.sh
# Run under Tini
CMD ["sh", "server.sh"] |
Thanks I got it to build and deploy curl -v https://trajano.net/swarm-visualizer/ ~~Missing metrics though #31 ~~ with metrics! |
Is it working now? |
From the documentation I presumed these were defaulted
But it seems I had to explicity set it in the environment. |
Note this is a personal build so it's not ideal. |
So you only rebuilt the image with the Dockerfile that I posted, and it worked? No change in the compose.yml file or anything else?
The default is not using |
Slight modification so I can test both locally and on the server. But same result FROM node:20-alpine AS base
RUN apk add --update tini lego curl && rm -r /var/cache
ENTRYPOINT ["/sbin/tini", "--"]
WORKDIR /home/node/app
FROM base AS dependencies
ENV NODE_ENV production
COPY package.json yarn.lock ./
RUN yarn install --production
FROM node:20-alpine AS base2
WORKDIR /w/
ADD https://github.com/mohsenasm/swarm-dashboard/files/13181678/index.js.zip /w
RUN unzip index.js.zip
FROM base AS release
WORKDIR /home/node/app
ENV LEGO_PATH=/lego-files
COPY --from=dependencies /home/node/app/node_modules node_modules
COPY --from=base2 /w/index.js client/index.js
COPY ./elm-client/client client
COPY server server
COPY server.sh server.sh
COPY healthcheck.sh healthcheck.sh
COPY crontab /var/spool/cron/crontabs/root
ENV PORT=8080
# HEALTHCHECK --interval=60s --timeout=30s \
# CMD sh healthcheck.sh
# Run under Tini
CMD ["sh", "server.sh"] My relevant compose file blocks (I added to my uber compose file)
|
I get some weird phantom CPU
Not sure how CPU is computed so it goes past 100% :) |
For example if you have two CPU cores, one 50% and another 61%, you will get 111% CPU usage. |
So the CPUs are summed up rather than averaged to a single number? |
Yes, like how |
Well back to the topic, not sure how to get a proper arm build of the image still. I don't think creating our own image and deploying it makes sense :D |
Exactly! I used platforms feature of the |
Just redownloaded it works now. I think I was still using the one with healthcheck when I last deployed.
|
I tried to deploy the build on a Raspberry Pi
I suspect it's because you're supporting LetsEncrypt and the binaries you are using to run the cron are not platform neutral
The text was updated successfully, but these errors were encountered: