You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.8 KiB
44 lines
1.8 KiB
|
|
ARG BUILD_IMAGE=ossrs/srs:aarch64
|
|
ARG IMAGE=arm64v8/ubuntu:18.04
|
|
|
|
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
|
|
FROM $BUILD_IMAGE as build
|
|
ARG BRANCH=4.0release
|
|
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin
|
|
|
|
RUN sed -i s/archive.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
|
sed -i s/security.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
|
apt update -qqy && \
|
|
apt install -y git
|
|
RUN git clone --depth 1 -b $BRANCH https://github.com/ossrs/srs.git
|
|
RUN cd srs/trunk && ./configure && make
|
|
|
|
FROM $IMAGE
|
|
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin
|
|
|
|
LABEL org.opencontainers.image.authors="76527413@qq.com"
|
|
|
|
RUN sed -i s/ports.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
|
apt update -y && \
|
|
apt install -y --fix-missing libxml2-dev liblzma-dev && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
rm -rf /usr/bin/qemu-aarch64-static
|
|
|
|
WORKDIR /usr/local/srs
|
|
EXPOSE 1935 1985 8080
|
|
|
|
COPY --from=build /tmp/srs/srs/trunk/objs/srs ./objs/srs
|
|
COPY --from=build /tmp/srs/srs/trunk/objs/nginx/html/index.html ./objs/nginx/html/index.html
|
|
COPY --from=build /tmp/srs/srs/trunk/research/players/crossdomain.xml ./objs/nginx/html/crossdomain.xml
|
|
COPY --from=build /tmp/srs/srs/trunk/conf/docker.conf ./conf/srs.conf
|
|
COPY --from=build /tmp/srs/srs/trunk/etc ./etc
|
|
COPY --from=build /tmp/srs/srs/trunk/usr ./usr
|
|
COPY --from=build /tmp/srs/srs/trunk/research/api-server/static-dir ./objs/nginx/html
|
|
COPY --from=build /tmp/srs/srs/trunk/research/console ./objs/nginx/html/console
|
|
COPY --from=build /tmp/srs/srs/trunk/research/players ./objs/nginx/html/players
|
|
COPY --from=build /tmp/srs/srs/trunk/3rdparty/signaling/www/demos ./objs/nginx/html/demos
|
|
COPY --from=build /usr/local/bin/ffmpeg ./objs/ffmpeg/bin/ffmpeg
|
|
|
|
CMD ./objs/srs -c ./conf/srs.conf
|