-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
How to use on raspberry pi 4 #402
Comments
Hi @X1pheR Maybe you can try: FROM arm64v8/node:alpine as build
WORKDIR /app
ADD . .
RUN yarn install -d \
&& yarn build \
&& rm dist/*.d.ts dist/*.js.map
FROM node:alpine as app
ENV NODE_ENV production
ADD root/ /
# add S6 Overlay, install shadow (for groupmod and usermod) and tzdata (for TZ env variable)
ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-armhf.tar.gz /tmp/
RUN tar xzf /tmp/s6-overlay-armhf.tar.gz -C / \
&& apk add --no-cache shadow tzdata
# add builded app
WORKDIR /app
COPY --from=build /app/dist/ /app/package.json ./
RUN yarn install -d \
&& yarn cache clean --force
VOLUME ["/scan"]
ENTRYPOINT ["/init"]
CMD ["/app.sh"] |
@manuc66: There are ways to build multi-arch images for docker, so we could at least provide one for x86_64 hardware and one for arm64 hardware like a raspberry pi 4. I own a raspberry pi 4 (running octoprint for 3d printing) and i'm thinking of converting it to docker so i can run additional services on it. That's probably happening in the next few months, then i could create a multi-arch container and test it on a raspberry pi. Docker's buildx system described here seems official and easy to use, so i could write all the scripts necessary for it. I'm not completely sure but i think currently you configured a build job on Docker Hub to build the image. According to the guide it would then use a github action instead, so you would just have to disable the current build job and add a Docker Hub access token to the repository in the secrets section. What do you think about that? |
@charlie89 Good proposal to have multi-arch docker images Today image are build with : https://github.com/manuc66/node-hp-scan-to/blob/master/.travis.yml#L17 but this can be changed of course |
@manuc66 Thank you so much for the fast update! I am receiving the following error on RPi 3B+ |
@clintonpower Could you try again, I forgot to use the appropriate S6 according to the arch (see: 13c0fcf) |
@manuc66 it works like a charm now, thank you so much, I appreciate your work! |
Would it be possible to provide a dockerfile for use on a raspberry pi 4 arm64? I tried modifying the current one but getting errors on the root and rootfs
The text was updated successfully, but these errors were encountered: