Code Monkey home page Code Monkey logo

Comments (7)

manuc66 avatar manuc66 commented on May 16, 2024 1

@clintonpower Could you try again, I forgot to use the appropriate S6 according to the arch (see: 13c0fcf)

from node-hp-scan-to.

clintonpower avatar clintonpower commented on May 16, 2024 1

@manuc66 it works like a charm now, thank you so much, I appreciate your work!

from node-hp-scan-to.

manuc66 avatar manuc66 commented on May 16, 2024

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"]

from node-hp-scan-to.

charlie89 avatar charlie89 commented on May 16, 2024

@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?

from node-hp-scan-to.

manuc66 avatar manuc66 commented on May 16, 2024

@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

from node-hp-scan-to.

manuc66 avatar manuc66 commented on May 16, 2024

@X1pheR @charlie89 @clintonpower

Could you test this : https://hub.docker.com/layers/node-hp-scan-to/manuc66/node-hp-scan-to/feature-multiarch-docker/images/sha256-0e73e2283569fc098b0a9ebafdd923d777cc43a7b7cb444982c21bfdcf06d667?context=repo

from node-hp-scan-to.

clintonpower avatar clintonpower commented on May 16, 2024

@manuc66 Thank you so much for the fast update! I am receiving the following error on RPi 3B+
node-hp-scan-to | /command/s6-overlay-suexec: line 1: syntax error: unexpected ")"
Am I missing something?

from node-hp-scan-to.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.