Dockerfile failed
christrt9 opened this issue · 2 comments
christrt9 commented
I download this repo and try to build docker but i get this error , i try to fix ut no luck :/
docker-compose build
Building frequi
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 101.3MB
Step 1/13 : FROM node:21.5.0-alpine as ui-builder
---> eced04caab4a
Step 2/13 : RUN mkdir /app
---> Using cache
---> c9ca6c56460e
Step 3/13 : WORKDIR /app
---> Using cache
---> 51d1f2890801
Step 4/13 : COPY package.json /app/package.json
---> Using cache
---> 6c34b54f4978
Step 5/13 : COPY yarn.lock /app/yarn.lock
---> Using cache
---> 408190df351a
Step 6/13 : RUN apk add --update --no-cache python3 g++ make && yarn && apk del python3 g++ make
---> Using cache
---> 060128a5d70d
Step 7/13 : COPY . /app
---> Using cache
---> 9ff5b573a676
Step 8/13 : RUN NODE_OPTIONS=--openssl-legacy-provider yarn build
---> Running in 3dc76134877f
Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
The command '/bin/sh -c NODE_OPTIONS=--openssl-legacy-provider yarn build' returned a non-zero code: 1
ERROR: Service 'frequi' failed to build : Build failed
christrt9 commented
I add RUN yarn install before build iis ok sorry
xmatthias commented
the proper fix is actually different (see linked commit) - your fix will evict the build cache whenever one of the source-files changes, causing a full reinstall on every rebuild - which is unnecessary and takes time (yarn is usually the slow step in the process).