Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Dockerfile and ws-scrcpy startup script #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions Dockerfile
@@ -0,0 +1,20 @@
FROM alpine:3.14 AS builder

ADD . /ws-scrcpy
RUN apk add --no-cache git nodejs npm python3 make g++

WORKDIR /ws-scrcpy
RUN npm install
RUN npm run dist

WORKDIR dist
RUN npm install

FROM alpine:3.14 AS runner
LABEL maintainer="Vitaly Repin <vitaly.repin@gmail.com>"

RUN apk add --no-cache android-tools npm
COPY --from=builder /ws-scrcpy /root/ws-scrcpy

WORKDIR /root/ws-scrcpy
CMD ["npm", "start"]
11 changes: 11 additions & 0 deletions README.md
Expand Up @@ -39,6 +39,17 @@ npm install
npm start
```

To build docker image:

```shell
docker build -t wsscrcpy:latest .
```
To run docker image:

```shell
docker run --rm -i -t --privileged -v /dev/bus/usb:/dev/bus/usb -p 127.0.0.1:8000:8000/tcp wsscrcpy:latest
```

## Supported features

### Android
Expand Down