admin管理员组文章数量:1296400
To reproduce:
$npx create-expo-app@latest expo-hello-world
$cd expo-hello-world/
$npx expo start
This pulls up a sample application, logging the QR code that can be scanned to access it. All is well. Now the problem is when I try to docker-ize the same process. I added the following to the created project:
Dockerfile
FROM node:23-alpine AS builder
WORKDIR /app
COPY package.json ./
RUN yarn install
COPY . .
RUN npx expo install
FROM node:23-alpine AS server
WORKDIR /app
COPY --from=builder /app/ ./
EXPOSE 8081
CMD ["npx", "expo", "start", "-c", "--go"]
docker-compose.yml
services:
app-expo:
build:
context: ./
dockerfile: Dockerfile
ports:
- "8081:8081"
environment:
- EXPO_PUBLIC_APP_BASE_URL=http://192.186.86.197:8081
networks:
- 'app-network'
networks:
app-network:
.dockerignore
node_modules/
.expo/
No QR code is present when I try through Docker doing docker compose up
. Has anyone had any luck doing this? Thanks in advance.
I tried to run the same process in Docker as on the command line and Docker did not produce a QR code to open the application.
本文标签: React Native Expo Doesn39t Show QR Code When Run in DockerStack Overflow
版权声明:本文标题:React Native Expo Doesn't Show QR Code When Run in Docker - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741637537a2389727.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论