Skip to content

Commit aecd468

Browse files
committed
Added Dockerfile, docker container build and usage instructions
1 parent 721cf95 commit aecd468

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM alpine:3.14 AS builder
2+
3+
ADD . /ws-scrcpy
4+
RUN apk add --no-cache git nodejs npm python3 make g++
5+
6+
WORKDIR /ws-scrcpy
7+
RUN npm install
8+
RUN npm run dist
9+
10+
WORKDIR dist
11+
RUN npm install
12+
13+
FROM alpine:3.14 AS runner
14+
LABEL maintainer="Vitaly Repin <[email protected]>"
15+
16+
RUN apk add --no-cache android-tools npm
17+
COPY --from=builder /ws-scrcpy /root/ws-scrcpy
18+
19+
WORKDIR /root/ws-scrcpy
20+
CMD ["npm", "start"]

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ npm install
3939
npm start
4040
```
4141

42+
To build docker image:
43+
44+
```shell
45+
docker build -t wsscrcpy:latest .
46+
```
47+
To run docker image:
48+
49+
```shell
50+
docker run --rm -i -t --privileged -v /dev/bus/usb:/dev/bus/usb -p 127.0.0.1:8000:8000/tcp wsscrcpy:latest
51+
```
52+
4253
## Supported features
4354

4455
### Android

0 commit comments

Comments
 (0)