mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Docker: Support x86_64, armv7 and aarch64 docker image (#3058). v4.0.252
This commit is contained in:
parent
0304e78cf1
commit
1f0ea3fdf5
6 changed files with 392 additions and 134 deletions
|
@ -1,14 +1,22 @@
|
|||
FROM ossrs/srs:dev AS build
|
||||
ARG ARCH
|
||||
FROM ${ARCH}ossrs/srs:ubuntu20 AS build
|
||||
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETPLATFORM
|
||||
ARG JOBS=2
|
||||
ARG SRS_AUTO_PACKAGER
|
||||
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, JOBS: $JOBS, PACKAGER: ${#SRS_AUTO_PACKAGER}"
|
||||
|
||||
# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Install depends tools.
|
||||
RUN yum install -y gcc make gcc-c++ patch unzip perl git
|
||||
|
||||
ARG SRS_AUTO_PACKAGER
|
||||
RUN apt-get update && apt-get install -y gcc make g++ patch unzip perl git
|
||||
|
||||
# Build and install SRS.
|
||||
COPY . /srs
|
||||
WORKDIR /srs/trunk
|
||||
RUN ./configure --srt=on --jobs=2 && make -j2 && make install
|
||||
RUN ./configure --srt=on --jobs=${JOBS} && make -j${JOBS} && make install
|
||||
|
||||
# All config files for SRS.
|
||||
RUN cp -R conf /usr/local/srs/conf && \
|
||||
|
@ -22,7 +30,11 @@ RUN cp -R conf /usr/local/srs/conf && \
|
|||
############################################################
|
||||
# dist
|
||||
############################################################
|
||||
FROM centos:7 AS dist
|
||||
FROM ${ARCH}ubuntu:focal AS dist
|
||||
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETPLATFORM
|
||||
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM"
|
||||
|
||||
# Expose ports for streaming @see https://github.com/ossrs/srs#ports
|
||||
EXPOSE 1935 1985 8080 8000/udp 10080/udp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue