mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Docker: Refine the main dockerfile. v6.0.54 (#3594)
------ Co-authored-by: Haibo Chen <495810242@qq.com>
This commit is contained in:
parent
be7faf6aa3
commit
8c061fcf5d
6 changed files with 18 additions and 13 deletions
|
@ -1,61 +0,0 @@
|
|||
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}"
|
||||
|
||||
# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# To use if in RUN, see https://github.com/moby/moby/issues/7281#issuecomment-389440503
|
||||
# Note that only exists issue like "/bin/sh: 1: [[: not found" for Ubuntu20, no such problem in CentOS7.
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
# Install depends tools.
|
||||
RUN if [[ $INSTALLDEPENDS != 'NO' ]]; then \
|
||||
apt-get update && apt-get install -y gcc make g++ patch unzip perl git libasan5; \
|
||||
fi
|
||||
|
||||
# Copy source code to docker.
|
||||
COPY . /srs
|
||||
WORKDIR /srs/trunk
|
||||
|
||||
# Build and install SRS.
|
||||
# Note that SRT is enabled by default, so we configure without --srt=on.
|
||||
# Note that we have copied all files by make install.
|
||||
RUN ./configure --gb28181=on --h265=on ${CONFARGS} && make ${MAKEARGS} && make install
|
||||
|
||||
############################################################
|
||||
# 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
|
||||
|
||||
# FFMPEG 4.1
|
||||
COPY --from=build /usr/local/bin/ffmpeg /usr/local/srs/objs/ffmpeg/bin/ffmpeg
|
||||
# SRS binary, config files and srs-console.
|
||||
COPY --from=build /usr/local/srs /usr/local/srs
|
||||
|
||||
# Test the version of binaries.
|
||||
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
|
||||
|
||||
# Default workdir and command.
|
||||
WORKDIR /usr/local/srs
|
||||
ENV SRS_LOG_TANK=console SRS_DAEMON=off
|
||||
CMD ["./objs/srs", "-c", "conf/srs.conf"]
|
||||
|
|
@ -8,6 +8,7 @@ The changelog for SRS.
|
|||
|
||||
## SRS 6.0 Changelog
|
||||
|
||||
* v6.0, 2023-06-20, Merge [#3594](https://github.com/ossrs/srs/pull/3594): Docker: Refine the main dockerfile. v6.0.54 (#3592)
|
||||
* v6.0, 2023-06-20, Merge [#3592](https://github.com/ossrs/srs/pull/3592): Fix Permission Issue in depend.sh for OpenSSL Compilation. v6.0.53 (#3592)
|
||||
* v6.0, 2023-06-20, Merge [#3591](https://github.com/ossrs/srs/pull/3591): Fix crash when process rtcp feedback message. v6.0.52 (#3591)
|
||||
* v6.0, 2023-06-15, Merge [#3581](https://github.com/ossrs/srs/pull/3581): WHIP: Add OBS support, ensuring compatibility with a unique SDP. v6.0.51 (#3581)
|
||||
|
|
|
@ -3,10 +3,14 @@
|
|||
About SRS Dockerfile:
|
||||
|
||||
* Dockerfile: For release and test.
|
||||
* Dockerfile.pkg: For package binary.
|
||||
* Dockerfile.builds: For test.
|
||||
* Dockerfile.test: For test.
|
||||
* Dockerfile.cov: For test and coverage.
|
||||
* trunk/Dockerfile.pkg: For package binary.
|
||||
* trunk/Dockerfile.builds: For test.
|
||||
* trunk/Dockerfile.test: For test.
|
||||
* trunk/Dockerfile.cov: For test and coverage.
|
||||
|
||||
```bash
|
||||
docker build -t srs -f Dockerfile .
|
||||
```
|
||||
|
||||
## Dependency Tree
|
||||
|
||||
|
@ -22,18 +26,18 @@ The dependency tree about Dockerfile:
|
|||
* [ossrs/srs:ubuntu20](https://github.com/ossrs/dev-docker/tree/ubuntu20)
|
||||
* ubuntu:focal
|
||||
* ubuntu:focal
|
||||
* Dockerfile.test
|
||||
* trunk/Dockerfile.test
|
||||
* [ossrs/srs:dev-gcc7-cache](https://github.com/ossrs/dev-docker/tree/ossrs/srs:dev-gcc7-cache)
|
||||
* [ossrs/srs:dev-gcc7](https://github.com/ossrs/dev-docker/tree/ossrs/srs:dev-gcc7)
|
||||
* centos:7
|
||||
* Dockerfile.cov
|
||||
* trunk/Dockerfile.cov
|
||||
* [ossrs/srs:dev-gcc7-cache](https://github.com/ossrs/dev-docker/tree/ossrs/srs:dev-gcc7-cache)
|
||||
* [ossrs/srs:dev-gcc7](https://github.com/ossrs/dev-docker/tree/ossrs/srs:dev-gcc7)
|
||||
* centos:7
|
||||
* Dockerfile.pkg
|
||||
* trunk/Dockerfile.pkg
|
||||
* [ossrs/srs:dev](https://github.com/ossrs/dev-docker/tree/ossrs/srs:dev)
|
||||
* centos:7
|
||||
* Dockerfile.builds
|
||||
* trunk/Dockerfile.builds
|
||||
* [ossrs/srs:dev-cache](https://github.com/ossrs/dev-docker/tree/ossrs/srs:dev-cache)
|
||||
* [ossrs/srs:dev](https://github.com/ossrs/dev-docker/tree/ossrs/srs:dev)
|
||||
* centos:7
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 6
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 53
|
||||
#define VERSION_REVISION 54
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue