Code Monkey home page Code Monkey logo

Comments (4)

Senaxx avatar Senaxx commented on July 22, 2024

Changing line 5 to the following solves that error:

COPY package*.json ./

from flame.

pawelmalak avatar pawelmalak commented on July 22, 2024

Changing line 5 to the following solves that error:

COPY package*.json ./

Really? It fails on mine (RPi 4). I tried to build it yesterday, changed that line to COPY package*.json ./ and while it passed that step it failed on the next one.

[pi@raspberrypi ttyid:0 Wed Jun 09 12:05:43 flame]$ uname -a
Linux raspberrypi 5.10.17-v8+ #1421 SMP PREEMPT Thu May 27 14:01:37 BST 2021 aarch64 GNU/Linux

from flame.

pawelmalak avatar pawelmalak commented on July 22, 2024

I got it working by using following Dockerfile.arm:

FROM node:14-alpine

WORKDIR /app

COPY package*.json ./

RUN apk --no-cache --virtual build-dependencies add python make g++ \
    && npm install --production

COPY . .

RUN mkdir -p ./public ./data \
    && cd ./client \
    && npm run build \
    && cd .. \
    && mv ./client/build/* ./public \
    && rm -rf ./client \
    && apk del build-dependencies

EXPOSE 5005

ENV NODE_ENV=production

CMD ["node", "server.js"]

And running:

docker build -t flame:dev --platform linux/arm64 -f Dockerfile.arm .

However building took over 15 minutes. Is there a better way?

from flame.

pawelmalak avatar pawelmalak commented on July 22, 2024

Tested on Raspberry Pi 4B with Raspberry Pi OS (64 bit):

git clone https://github.com/pawelmalak/flame
cd flame
npm run dev-init
docker build -t flame -f Dockerfile.multiarch .

As I said in previous response, it take about 15 minutes to build on RPi. It might look like it's stuck at one point but just let it finish.

from flame.

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.