fix sharp binary installation in frontend image
This commit is contained in:
@@ -8,6 +8,15 @@ RUN apt-get update -y \
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci --ignore-scripts --legacy-peer-deps
|
||||
RUN set -eux; \
|
||||
arch="$(dpkg --print-architecture)"; \
|
||||
if [ "$arch" = "amd64" ]; then \
|
||||
npm rebuild sharp --platform=linux --arch=x64 || npm install --no-save sharp --platform=linux --arch=x64; \
|
||||
elif [ "$arch" = "arm64" ]; then \
|
||||
npm rebuild sharp --platform=linux --arch=arm64 || npm install --no-save sharp --platform=linux --arch=arm64; \
|
||||
else \
|
||||
npm rebuild sharp || true; \
|
||||
fi
|
||||
|
||||
COPY . .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user