12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- ARG ARCH
- ARG IMAGE=ossrs/srs:ubuntu20
- FROM ${ARCH}${IMAGE} AS build
- ARG CONFARGS
- ARG MAKEARGS
- ARG INSTALLDEPENDS
- ARG BUILDPLATFORM
- ARG TARGETPLATFORM
- ARG SRS_AUTO_PACKAGER
- RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, PACKAGER: ${#SRS_AUTO_PACKAGER}, CONFARGS: ${CONFARGS}, MAKEARGS: ${MAKEARGS}, INSTALLDEPENDS: ${INSTALLDEPENDS}"
- ENV DEBIAN_FRONTEND=noninteractive
- SHELL ["/bin/bash", "-c"]
- RUN if [[ $INSTALLDEPENDS != 'NO' ]]; then \
- apt-get update && apt-get install -y gcc make g++ patch unzip perl git libasan5; \
- fi
- COPY . /srs
- WORKDIR /srs/trunk
- RUN ./configure ${CONFARGS} && make ${MAKEARGS} && make install
- FROM ${ARCH}ubuntu:focal AS dist
- ARG BUILDPLATFORM
- ARG TARGETPLATFORM
- RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM"
- EXPOSE 1935 1985 8080 5060 9000 8000/udp 10080/udp
- COPY --from=build /usr/local/bin/ffmpeg /usr/local/srs/objs/ffmpeg/bin/ffmpeg
- COPY --from=build /usr/local/srs /usr/local/srs
- RUN ldd /usr/local/srs/objs/ffmpeg/bin/ffmpeg && \
- /usr/local/srs/objs/ffmpeg/bin/ffmpeg -version && \
- ldd /usr/local/srs/objs/srs && \
- /usr/local/srs/objs/srs -v
- WORKDIR /usr/local/srs
- ENV SRS_DAEMON=off SRS_IN_DOCKER=on
- CMD ["./objs/srs", "-c", "conf/docker.conf"]
|