Creating a Docker image for standalone builds of Expo based React Native apps
May 31, 2021
Notizen fuer ein Docker-Image mit Expo/Turtle (classic). Fokus: Dependencies, Node-Version, Memory-Probleme.
Voraussetzungen
- Node 14 (npm 6) fuer
turtle-cli - JDK 8
- Python (fuer
node-gyp)
Typische Probleme
npm 7+ (Dependency Tree)
code
npm ERR! ERESOLVE unable to resolve dependency tree
Loesung: npm 6 oder --legacy-peer-deps.
Permissions
Ohne --unsafe-perm/--allow-root kann es zu EACCES kommen.
OOM (Code 137)
code
The command ... returned a non-zero code: 137
Heisst: zu wenig RAM beim Installieren von turtle-cli.
Beispiel-Setup (Dockerfile-Skizze)
code
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y \
curl build-essential openjdk-8-jdk python3
# Node 14 (z. B. via nvm)
Hinweise
- Expo Classic Builds sind legacy. Wenn moeglich: EAS Build nutzen.