forked from pierlon/scrcpy-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (41 loc) · 1.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
### builder
FROM alpine:edge AS builder
ARG SCRCPY_VER=1.16
ARG SERVER_HASH="94a79e05b4498d0460ab7bd9d12cbf05156e3a47bf0c5d1420cee1d4493b3832"
RUN apk add --no-cache \
curl \
ffmpeg-dev \
gcc \
git \
make \
meson \
musl-dev \
openjdk8 \
pkgconf \
sdl2-dev
RUN PATH=$PATH:/usr/lib/jvm/java-1.8-openjdk/bin
RUN curl -L -o scrcpy-server https://github.com/Genymobile/scrcpy/releases/download/v${SCRCPY_VER}/scrcpy-server-v${SCRCPY_VER}
RUN echo "$SERVER_HASH /scrcpy-server" | sha256sum -c -
RUN git clone https://github.com/Genymobile/scrcpy.git
RUN cd scrcpy && meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=/scrcpy-server
RUN cd scrcpy/x && ninja
### runner
FROM alpine:edge AS runner
# needed for android-tools
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
LABEL maintainer="Pierre Gordon <[email protected]>"
RUN apk add --no-cache \
android-tools \
ffmpeg \
virtualgl
COPY --from=builder /scrcpy-server /usr/local/share/scrcpy/
COPY --from=builder /scrcpy/x/app/scrcpy /usr/local/bin/
### runner (amd)
FROM runner AS amd
RUN apk add --no-cache mesa-dri-swrast
### runner (intel)
FROM runner AS intel
RUN apk add --no-cache mesa-dri-intel
### runner (nvidia)
FROM runner AS nvidia
RUN apk add --no-cache mesa-dri-nouveau