refactored the wsscrcpy dockerfile
This commit is contained in:
27
dockerfiles/ws-scrcpy.Dockerfile
Normal file
27
dockerfiles/ws-scrcpy.Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM node:25-bookworm
|
||||
|
||||
# System deps: ADB for device communication, build tools for native modules (node-pty)
|
||||
RUN apt-get update && \
|
||||
apt-get install -y android-tools-adb python3 make g++ git && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Clone and build ws-scrcpy
|
||||
WORKDIR /build
|
||||
RUN git clone --depth 1 https://github.com/NetrisTV/ws-scrcpy.git . && \
|
||||
npm install && \
|
||||
npm run dist:prod
|
||||
|
||||
# Set up runtime
|
||||
WORKDIR /app
|
||||
RUN cp -r /build/dist/* . && \
|
||||
npm install && \
|
||||
rm -rf /build
|
||||
|
||||
# Copy config and entrypoint from repo
|
||||
COPY apps/ws-scrcpy/config.yaml /app/config.yaml
|
||||
COPY apps/ws-scrcpy/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user