Fix docker build for arm64 image (#19530)

* Fix docker build for arm64 image

* Add changeset
This commit is contained in:
Pascal Jufer
2023-08-25 18:30:58 +02:00
committed by GitHub
parent 3ec4009bb8
commit 830bddd554
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
'directus': patch
---
Fixed docker build for arm64 image

View File

@@ -6,8 +6,18 @@
FROM node:18-alpine AS builder
WORKDIR /directus
ARG TARGETPLATFORM
ENV NODE_OPTIONS=--max-old-space-size=8192
RUN \
if [ "$TARGETPLATFORM" = 'linux/arm64' ]; then \
apk --no-cache add \
python3 \
build-base \
&& ln -sf /usr/bin/python3 /usr/bin/python \
; fi
COPY package.json .
RUN corepack enable && corepack prepare