Skip to content

Commit

Permalink
Added Dockerfile, docker container build and usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyrepin committed Oct 11, 2021
1 parent 09ab2ff commit 32ab933
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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

0 comments on commit 32ab933

Please sign in to comment.