File: Dockerfile

package info (click to toggle)
golang-github-andreykaipov-goobs 0.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,228 kB
  • sloc: makefile: 32
file content (43 lines) | stat: -rw-r--r-- 1,783 bytes parent folder | download
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
FROM alpine:3.14 AS build
ENV obs_studio_version    27.0.1
ENV obs_websocket_version 4.9.1

RUN apk add -U git build-base cmake
RUN apk add -U qt5-qtbase-dev ffmpeg-dev curl-dev wayland-dev x264-dev qt5-qtsvg-dev

# install obs (https://obsproject.com/wiki/install-instructions#linux-portable-mode-all-distros)
WORKDIR /work
RUN git clone --recursive https://github.com/obsproject/obs-studio.git
WORKDIR /work/obs-studio/build
RUN git checkout "$obs_studio_version"
RUN cmake -DUNIX_STRUCTURE=0 -DCMAKE_INSTALL_PREFIX=/opt/obs -DBUILD_BROWSER=OFF -DBUILD_VST=OFF DENABLE_PIPEWIRE=OFF ..
RUN make -j4
RUN make install

# install obs-websocket (https://github.com/Palakis/obs-websocket/issues/586#issuecomment-769836454)
WORKDIR /work
RUN git clone --recursive https://github.com/Palakis/obs-websocket.git
WORKDIR /work/obs-websocket/build
RUN git checkout 4.9.1
ENV LIBRARY_PATH /opt/obs/bin/64bit
RUN cmake -DLIBOBS_INCLUDE_DIR=/work/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/opt/obs-websocket -DUSE_UBUNTU_FIX=true ..
RUN make -j4
RUN cp obs-websocket.so /opt/obs/obs-plugins/64bit/

FROM alpine:3.14
COPY --from=build /opt /opt
COPY --from=build /lib/libmount.so.1 /lib/libmount.so.1
COPY --from=build /lib/libblkid.so.1 /lib/libblkid.so.1
COPY --from=build /usr/lib /usr/lib
COPY basic.ini /root/.config/obs-studio/basic/profiles/Untitled/basic.ini
WORKDIR /opt/obs/bin/64bit/

# --init doesn't seem to work within a GH actions service container, so we add
# the init system ourselves to essentially always run with --init
ENV tini_version v0.19.0
ADD https://github.com/krallin/tini/releases/download/${tini_version}/tini-static /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]

RUN apk add -U xvfb-run mesa-dri-gallium
CMD ["xvfb-run", "-s", "-screen 0 800x600x24", "./obs"]