Retry SharedCode fetches in Docker builds
This commit is contained in:
1 parent
778cded8bf
commit
bb6a7d0fed
4 files changed
+59
-5
No files matched your search
+7
-1
@@ -2,7 +2,13 @@ FROM node:22-alpine AS frontend-builder
|
||||
RUN apk add --no-cache git
|
||||
WORKDIR /frontend
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm ci
|
||||
RUN for attempt in 1 2 3 4 5; do \
|
||||
npm ci && break; \
|
||||
if [ "$attempt" -eq 5 ]; then exit 1; fi; \
|
||||
delay=$((attempt * 5)); \
|
||||
echo "SharedCode npm install failed (attempt ${attempt}/5); retrying in ${delay}s..." >&2; \
|
||||
sleep "$delay"; \
|
||||
done
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
|
||||
Reference in new issue
Block a user