Skip to content

Instantly share code, notes, and snippets.

@uru2
Created January 29, 2020 17:36
Show Gist options
  • Save uru2/cb3f7b553c2c58570ca9bf18e47cebb3 to your computer and use it in GitHub Desktop.
Save uru2/cb3f7b553c2c58570ca9bf18e47cebb3 to your computer and use it in GitHub Desktop.
mirakc Dockerfile for Alpine Linux 3.11.x
FROM alpine:3.11
ARG recdvb_version=1.3.2
RUN set -eux \
\
# install packages
&& apk update -U \
&& apk add --no-cache curl libstdc++ socat tini tzdata v4l-utils-dvbv5 \
autoconf automake cargo cmake coreutils g++ gcc git libtool linux-headers make ninja pkgconfig \
\
# recpt1 configured without `--enable-b25`
&& mkdir -p /build/recpt1/ \
&& cd /build/recpt1/ \
&& curl -fsSL https://github.com/stz2012/recpt1/tarball/master \
| tar -xz --strip-components=1 \
&& cd /build/recpt1/recpt1/ \
&& ./autogen.sh \
&& ./configure --prefix=/usr/local \
&& make -j $(nproc) \
&& make install \
\
# dvbv5 channel config for ISDB
&& mkdir -p /usr/local/etc/dvbconf-for-isdb/ \
&& curl -fsSL https://github.com/Chinachu/dvbconf-for-isdb/tarball/master \
| tar -xz --strip-components=2 -C /usr/local/etc/dvbconf-for-isdb/ \
\
# recdvb configured without `--enable-b25`
&& mkdir -p /build/recdvb/ \
&& cd /build/recdvb/ \
&& curl -fsSL "http://www13.plala.or.jp/sat/recdvb/recdvb-${recdvb_version}.tgz" \
| tar -xz --strip-components=1 \
&& ./autogen.sh \
&& ./configure --prefix=/usr/local \
&& sed -i -e s/msgbuf/_msgbuf/ recpt1core.h \
&& sed -i '1i#include <sys/types.h>' recpt1.h \
&& make -j $(nproc) \
&& make install \
\
# mirakc-arib
&& mkdir /build/mirakc-arib/ \
&& cd /build/mirakc-arib/ \
&& curl -fsSL https://github.com/masnagam/mirakc-arib/tarball/master \
| tar -xz --strip-components=1 \
&& cmake -S . -B . -G Ninja -D CMAKE_BUILD_TYPE=Release \
&& CPPFLAGS="-Wno-error=zero-as-null-pointer-constant" ninja vendor \
&& ninja \
&& cp /build/mirakc-arib/bin/mirakc-arib /usr/local/bin/ \
\
# mirakc
&& mkdir /build/mirakc/ \
&& cd /build/mirakc/ \
&& curl -fsSL https://github.com/masnagam/mirakc/tarball/master \
| tar -zx --strip-components=1 \
&& cargo build --release \
&& cp /build/mirakc/target/release/mirakc /usr/local/bin \
\
# cleanup
&& cd / \
&& rm -rf /build/ /root/.cargo/ /root/.cmake/ \
&& apk del autoconf automake cargo cmake coreutils g++ gcc git libtool linux-headers make ninja pkgconfig
ENV MIRAKC_CONFIG=/etc/mirakc/config.yml
EXPOSE 40772
VOLUME ["/var/lib/mirakc/epg"]
ENTRYPOINT ["/sbin/tini", "--", "mirakc"]
CMD []
@uru2
Copy link
Author

uru2 commented Jan 29, 2020

このファイルはパブリックドメイン扱いとします。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment