Help Building Docker Image : ERROR: failed to solve: process #3141
Unanswered
NewMan2024
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
kevin@localhost main4 % sudo docker build [docker-image-name] .
[+] Building 512.0s (28/28) FINISHED docker:desktop-linux
=> [internal] load .dockerignore 0.0s
=> => transferring context: 268B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 4.07kB 0.0s
=> [internal] load metadata for docker.io/library/node:20-alpine 0.0s
=> [ 1/24] FROM docker.io/library/node:20-alpine 0.0s
=> [internal] load build context 19.8s
=> => transferring context: 13.82MB 17.9s
=> CACHED [ 2/24] RUN apk --no-cache add curl 0.0s
=> CACHED [ 3/24] RUN mkdir -p /app /root/.npm/_cacache 0.0s
=> CACHED [ 4/24] RUN chown -R node:node /root/.npm 0.0s
=> CACHED [ 5/24] WORKDIR /app 0.0s
=> [ 6/24] COPY package*.json ./ 2.7s
=> [ 7/24] COPY config/prepare.js ./config/prepare.js 0.0s
=> [ 8/24] RUN echo "Step 1: Setting npm configs" && npm config set fetch-retry-maxtimeout 600 103.3s
=> [ 9/24] RUN echo "Step 3: Installing rollup and plugins globally" && npm install -g rollup@2 27.3s
=> [10/24] COPY . . 146.2s
=> [11/24] WORKDIR /app/packages/data-provider 0.3s
=> [12/24] RUN npm install --legacy-peer-deps --force 18.0s
=> [13/24] RUN npm install [email protected] [email protected] --no-audit --legacy-peer-deps --force 23.9s
=> [14/24] WORKDIR /app 0.2s
=> [15/24] RUN echo "Step 5: Creating necessary files and directories" && touch .env && mkdi 1.0s
=> [16/24] WORKDIR /app/packages/data-provider 0.1s
=> [17/24] RUN npm install --save-dev [email protected] @rollup/[email protected] --legacy-peer-deps - 32.9s
=> [18/24] WORKDIR /app 0.1s
=> [19/24] RUN echo "Step 7: Installing cross-env globally" && npm install -g [email protected] -- 4.1s
=> [20/24] RUN echo "Step 8: Installing vite as a production dependency" && npm install vite@5. 24.5s
=> [21/24] WORKDIR /app/client 0.2s
=> [22/24] RUN echo "Step 9: Installing @vitejs/plugin-react, @rollup/plugin-inject, magic-string, 16.5s
=> [23/24] WORKDIR /app 0.1s
=> ERROR [24/24] RUN echo "Step 10: Modifying the frontend script in package.json" && sed -i 's 89.0s
Dockerfile:86
85 | WORKDIR /app
86 | >>> RUN echo "Step 10: Modifying the frontend script in package.json" &&
87 | >>> sed -i 's/"build": "cross-env NODE_ENV=production vite build"/"build": "cross-env NODE_ENV=production npx vite build"/g' client/package.json &&
88 | >>> echo "Step 11: Building the React client" &&
89 | >>> NODE_OPTIONS="--max-old-space-size=2048" npm run build:data-provider --force &&
90 | >>> cd client && npm run build --force &&
91 | >>> echo "Step 12: Pruning and cleaning npm cache" &&
92 | >>> npm prune --production --force &&
93 | >>> npm cache clean --force
94 |
ERROR: failed to solve: process "/bin/sh -c echo "Step 10: Modifying the frontend script in package.json" && sed -i 's/"build": "cross-env NODE_ENV=production vite build"/"build": "cross-env NODE_ENV=production npx vite build"/g' client/package.json && echo "Step 11: Building the React client" && NODE_OPTIONS="--max-old-space-size=2048" npm run build:data-provider --force && cd client && npm run build --force && echo "Step 12: Pruning and cleaning npm cache" && npm prune --production --force && npm cache clean --force" did not complete successfully: exit code: 1
Beta Was this translation helpful? Give feedback.
All reactions