Debian Codegraph @

e2e/Dockerfile

raw
1 FROM alpine:3.14 AS build
2 ENV obs_studio_version 27.0.1
3 ENV obs_websocket_version 4.9.1
4
5 RUN apk add -U git build-base cmake
6 RUN apk add -U qt5-qtbase-dev ffmpeg-dev curl-dev wayland-dev x264-dev qt5-qtsvg-dev
7
8 # install obs (https://obsproject.com/wiki/install-instructions#linux-portable-mode-all-distros)
9 WORKDIR /work
10 RUN git clone --recursive https://github.com/obsproject/obs-studio.git
11 WORKDIR /work/obs-studio/build
12 RUN git checkout "$obs_studio_version"
13 RUN cmake -DUNIX_STRUCTURE=0 -DCMAKE_INSTALL_PREFIX=/opt/obs -DBUILD_BROWSER=OFF -DBUILD_VST=OFF DENABLE_PIPEWIRE=OFF ..
14 RUN make -j4
15 RUN make install
16
17 # install obs-websocket (https://github.com/Palakis/obs-websocket/issues/586#issuecomment-769836454)
18 WORKDIR /work
19 RUN git clone --recursive https://github.com/Palakis/obs-websocket.git
20 WORKDIR /work/obs-websocket/build
21 RUN git checkout 4.9.1
22 ENV LIBRARY_PATH /opt/obs/bin/64bit
23 RUN cmake -DLIBOBS_INCLUDE_DIR=/work/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/opt/obs-websocket -DUSE_UBUNTU_FIX=true ..
24 RUN make -j4
25 RUN cp obs-websocket.so /opt/obs/obs-plugins/64bit/
26
27 FROM alpine:3.14
28 COPY --from=build /opt /opt
29 COPY --from=build /lib/libmount.so.1 /lib/libmount.so.1
30 COPY --from=build /lib/libblkid.so.1 /lib/libblkid.so.1
31 COPY --from=build /usr/lib /usr/lib
32 COPY basic.ini /root/.config/obs-studio/basic/profiles/Untitled/basic.ini
33 WORKDIR /opt/obs/bin/64bit/
34
35 # --init doesn't seem to work within a GH actions service container, so we add
36 # the init system ourselves to essentially always run with --init
37 ENV tini_version v0.19.0
38 ADD https://github.com/krallin/tini/releases/download/${tini_version}/tini-static /tini
39 RUN chmod +x /tini
40 ENTRYPOINT ["/tini", "--"]
41
42 RUN apk add -U xvfb-run mesa-dri-gallium
43 CMD ["xvfb-run", "-s", "-screen 0 800x600x24", "./obs"]