Skip to content

Commit

Permalink
Docker: Support x86_64, armv7 and aarch64 docker image (#3058). v5.0.29
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jun 15, 2022
1 parent d525d27 commit f568e4f
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 55 deletions.
91 changes: 48 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

# The github.ref is, for example, refs/tags/v4.0.145 or refs/tags/v4.0-r8
# The github.ref is, for example, refs/tags/v5.0.145 or refs/tags/v5.0-r8
# Generate variables like:
# SRS_TAG=v4.0-r8
# SRS_TAG=v4.0.145
# SRS_VERSION=4.0.145
# SRS_VERSION=4.0-r8
# SRS_MAJOR=4
# SRS_TAG=v5.0-r8
# SRS_TAG=v5.0.145
# SRS_VERSION=5.0.145
# SRS_VERSION=5.0-r8
# SRS_MAJOR=5
# @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
- name: Generate varaiables
run: |
Expand Down Expand Up @@ -106,6 +106,7 @@ jobs:
-t ossrs/srs:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f trunk/Dockerfile .
# Docker alias images
# TODO: FIXME: If stable, please set the latest from 4.0 to 5.0
- name: Docker alias images for ossrs/srs
uses: akhilerm/[email protected]
with:
Expand All @@ -114,9 +115,10 @@ jobs:
ossrs/srs:${{ env.SRS_VERSION }}
ossrs/srs:${{ env.SRS_MAJOR }}
ossrs/srs:v${{ env.SRS_MAJOR }}
ossrs/srs:latest
#ossrs/srs:latest
# Aliyun ACR
# TODO: FIXME: If stable, please set the latest from 4.0 to 5.0
- name: Login aliyun hub
uses: docker/login-action@v1
with:
Expand All @@ -132,7 +134,7 @@ jobs:
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_VERSION }}
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_MAJOR }}
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:latest
#registry.cn-hangzhou.aliyuncs.com/ossrs/srs:latest
docker-droplet:
name: docker-droplet
Expand All @@ -156,13 +158,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

# The github.ref is, for example, refs/tags/v4.0.145 or refs/tags/v4.0-r8
# The github.ref is, for example, refs/tags/v5.0.145 or refs/tags/v5.0-r8
# Generate variables like:
# SRS_TAG=v4.0-r8
# SRS_TAG=v4.0.145
# SRS_VERSION=4.0.145
# SRS_VERSION=4.0-r8
# SRS_MAJOR=4
# SRS_TAG=v5.0-r8
# SRS_TAG=v5.0.145
# SRS_VERSION=5.0.145
# SRS_VERSION=5.0-r8
# SRS_MAJOR=5
# @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
- name: Generate varaiables
run: |
Expand Down Expand Up @@ -192,6 +194,7 @@ jobs:
-t ossrs/droplet:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER_DROPLET -f trunk/Dockerfile .
# Docker alias images
# TODO: FIXME: If stable, please set the latest from 4.0 to 5.0
- name: Docker alias images for ossrs/droplet
uses: akhilerm/[email protected]
with:
Expand All @@ -200,9 +203,10 @@ jobs:
ossrs/droplet:${{ env.SRS_VERSION }}
ossrs/droplet:${{ env.SRS_MAJOR }}
ossrs/droplet:v${{ env.SRS_MAJOR }}
ossrs/droplet:latest
#ossrs/droplet:latest
# Aliyun ACR
# TODO: FIXME: If stable, please set the latest from 4.0 to 5.0
- name: Login aliyun hub
uses: docker/login-action@v1
with:
Expand All @@ -218,7 +222,7 @@ jobs:
registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:${{ env.SRS_VERSION }}
registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:${{ env.SRS_MAJOR }}
registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:v${{ env.SRS_MAJOR }}
registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:latest
#registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:latest
docker-lighthouse:
name: docker-lighthouse
Expand All @@ -242,13 +246,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

# The github.ref is, for example, refs/tags/v4.0.145 or refs/tags/v4.0-r8
# The github.ref is, for example, refs/tags/v5.0.145 or refs/tags/v5.0-r8
# Generate variables like:
# SRS_TAG=v4.0-r8
# SRS_TAG=v4.0.145
# SRS_VERSION=4.0.145
# SRS_VERSION=4.0-r8
# SRS_MAJOR=4
# SRS_TAG=v5.0-r8
# SRS_TAG=v5.0.145
# SRS_VERSION=5.0.145
# SRS_VERSION=5.0-r8
# SRS_MAJOR=5
# @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
- name: Generate varaiables
run: |
Expand Down Expand Up @@ -278,6 +282,7 @@ jobs:
-t ossrs/lighthouse:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER_LIGHTHOUSE -f trunk/Dockerfile .
# Docker alias images
# TODO: FIXME: If stable, please set the latest from 4.0 to 5.0
- name: Docker alias images for ossrs/lighthouse
uses: akhilerm/[email protected]
with:
Expand All @@ -286,9 +291,10 @@ jobs:
ossrs/lighthouse:${{ env.SRS_VERSION }}
ossrs/lighthouse:${{ env.SRS_MAJOR }}
ossrs/lighthouse:v${{ env.SRS_MAJOR }}
ossrs/lighthouse:latest
#ossrs/lighthouse:latest
# Aliyun ACR
# TODO: FIXME: If stable, please set the latest from 4.0 to 5.0
- name: Login aliyun hub
uses: docker/login-action@v1
with:
Expand All @@ -304,7 +310,7 @@ jobs:
registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:${{ env.SRS_VERSION }}
registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:${{ env.SRS_MAJOR }}
registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:v${{ env.SRS_MAJOR }}
registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:latest
#registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:latest
update:
name: update
Expand All @@ -323,13 +329,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# The github.ref is, for example, refs/tags/v4.0.145 or refs/tags/v4.0-r8
# The github.ref is, for example, refs/tags/v5.0.145 or refs/tags/v5.0-r8
# Generate variables like:
# SRS_TAG=v4.0-r8
# SRS_TAG=v4.0.145
# SRS_VERSION=4.0.145
# SRS_VERSION=4.0-r8
# SRS_MAJOR=4
# SRS_TAG=v5.0-r8
# SRS_TAG=v5.0.145
# SRS_VERSION=5.0.145
# SRS_VERSION=5.0-r8
# SRS_MAJOR=5
# @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
- name: Generate varaiables
run: |
Expand Down Expand Up @@ -384,13 +390,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# The github.ref is, for example, refs/tags/v4.0.145 or refs/tags/v4.0-r8
# The github.ref is, for example, refs/tags/v5.0.145 or refs/tags/v5.0-r8
# Generate variables like:
# SRS_TAG=v4.0-r8
# SRS_TAG=v4.0.145
# SRS_VERSION=4.0.145
# SRS_VERSION=4.0-r8
# SRS_MAJOR=4
# SRS_TAG=v5.0-r8
# SRS_TAG=v5.0.145
# SRS_VERSION=5.0.145
# SRS_VERSION=5.0-r8
# SRS_MAJOR=5
# @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
- name: Generate varaiables
run: |
Expand Down Expand Up @@ -433,7 +439,8 @@ jobs:
echo "SRS_PACKAGE_MD5=$(md5sum $SRS_PACKAGE_ZIP| awk '{print $1}')" >> $GITHUB_ENV
# Create release.
# TODO: FIXME: Refine the release when 5.0 releoased
# TODO: FIXME: Refine the release when 5.0 released
# TODO: FIXME: Change prerelease to false when 5.0 released
- name: Create release
id: create_release
uses: actions/create-release@v1
Expand All @@ -448,12 +455,10 @@ jobs:
* Source: ${{ env.SRS_SOURCE_MD5 }} [${{ env.SRS_SOURCE_TAR }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_SOURCE_TAR }})
* Binary: ${{ env.SRS_PACKAGE_MD5 }} [${{ env.SRS_PACKAGE_ZIP }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_PACKAGE_ZIP }})
## Docker
* China: [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:latest](https://github.com/ossrs/srs/wiki/v4_CN_Home#docker)
* China: [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}](https://github.com/ossrs/srs/wiki/v4_CN_Home#docker)
* China: [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}](https://github.com/ossrs/srs/wiki/v4_CN_Home#docker)
* Global: [docker pull ossrs/srs:latest](https://github.com/ossrs/srs/wiki/v4_EN_Home#docker)
* Global: [docker pull ossrs/srs:${{ env.SRS_MAJOR }}](https://github.com/ossrs/srs/wiki/v4_EN_Home#docker)
* Global: [docker pull ossrs/srs:${{ env.SRS_TAG }}](https://github.com/ossrs/srs/wiki/v4_EN_Home#docker)
* China: [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}](https://github.com/ossrs/srs/wiki/v5_CN_Home#docker)
* China: [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}](https://github.com/ossrs/srs/wiki/v5_CN_Home#docker)
* Global: [docker pull ossrs/srs:${{ env.SRS_MAJOR }}](https://github.com/ossrs/srs/wiki/v5_EN_Home#docker)
* Global: [docker pull ossrs/srs:${{ env.SRS_TAG }}](https://github.com/ossrs/srs/wiki/v5_EN_Home#docker)
## Doc
* [FAQ](https://github.com/ossrs/srs/issues/2716), [Features](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/Features.md#features) or [ChangeLogs](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/CHANGELOG.md#changelog)
draft: false
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
# Build for CentOS 6
- name: Build on CentOS6, baseline
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos6-baseline .
- name: Build on CentOS6, with SRT
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos6-srt .
# Build for CentOS 8
- name: Build on CentOS8, baseline
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos8-baseline .
Expand Down Expand Up @@ -121,7 +123,7 @@ jobs:
SRS_SHA=${{ github.sha }}
# Note that the root of SRS, must contains .git, for report fixing.
SRS_PROJECT=/srs
# The github.ref is, for example, refs/heads/4.0release
# The github.ref is, for example, refs/heads/develop
SRS_BRANCH=$(echo ${{ github.ref }}| awk -F 'refs/heads/' '{print $2}'| awk -F '/' '{print $1}')
# The github.ref is, for example, refs/pull/2536/merge
SRS_PR=$(echo ${{ github.ref }}| awk -F 'refs/pull/' '{print $2}'| awk -F '/' '{print $1}')
Expand Down
3 changes: 2 additions & 1 deletion trunk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y gcc make g++ patch unzip perl git

# Build and install SRS.
# Note that SRT is enabled by default, so we configure without --srt=on.
COPY . /srs
WORKDIR /srs/trunk
RUN ./configure --srt=on --jobs=${JOBS} && make -j${JOBS} && make install
RUN ./configure --jobs=${JOBS} && make -j${JOBS} && make install

# All config files for SRS.
RUN cp -R conf /usr/local/srs/conf && \
Expand Down
22 changes: 13 additions & 9 deletions trunk/Dockerfile.builds
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
########################################################
FROM ossrs/srs:dev AS centos7-baseline
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 && make -j2
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off && make -j2

FROM ossrs/srs:dev AS centos7-no-webrtc
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --rtc=off && make -j2
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --rtc=off && make -j2

FROM ossrs/srs:dev AS centos7-no-asm
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --nasm=off --srtp-nasm=off && make -j2
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --nasm=off --srtp-nasm=off && make -j2

FROM ossrs/srs:dev AS centos7-srt
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=on && make -j2

FROM ossrs/srs:dev AS centos7-ansi-no-ffmpeg
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --cxx11=off --cxx14=off --ffmpeg-fit=off && make -j2
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --cxx11=off --cxx14=off --ffmpeg-fit=off && make -j2

########################################################
FROM ossrs/srs:dev6 AS centos6-baseline
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --cxx11=off --cxx14=off && make -j2
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --cxx11=off --cxx14=off && make -j2

FROM ossrs/srs:dev6 AS centos6-srt
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=on --cxx11=off --cxx14=off && make -j2

########################################################
FROM ossrs/srs:dev8 AS centos8-baseline
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 && make -j2
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off && make -j2

FROM ossrs/srs:dev8 AS centos8-srt
COPY . /srs
Expand All @@ -36,7 +40,7 @@ RUN cd /srs/trunk && ./configure --jobs=2 --srt=on && make -j2
########################################################
FROM ossrs/srs:ubuntu16 AS ubuntu16-baseline
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 && make -j2
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off && make -j2

FROM ossrs/srs:ubuntu16 AS ubuntu16-srt
COPY . /srs
Expand All @@ -45,7 +49,7 @@ RUN cd /srs/trunk && ./configure --jobs=2 --srt=on && make -j2
########################################################
FROM ossrs/srs:ubuntu18 AS ubuntu18-baseline
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 && make -j2
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off && make -j2

FROM ossrs/srs:ubuntu18 AS ubuntu18-srt
COPY . /srs
Expand All @@ -54,7 +58,7 @@ RUN cd /srs/trunk && ./configure --jobs=2 --srt=on && make -j2
########################################################
FROM ossrs/srs:ubuntu20 AS ubuntu20-baseline
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 && make -j2
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off && make -j2

FROM ossrs/srs:ubuntu20 AS ubuntu20-srt
COPY . /srs
Expand Down
1 change: 1 addition & 0 deletions trunk/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The changelog for SRS.

## SRS 5.0 Changelog

* v5.0, 2022-06-15, For [#3058](https://github.com/ossrs/srs/pull/3058): Docker: Support x86_64, armv7 and aarch64 docker image (#3058). v5.0.29
* v5.0, 2022-04-04, Support NGINX HLS Cluster, see [CN](https://github.com/ossrs/srs/wiki/v4_CN_SampleHlsCluster) or [EN](https://github.com/ossrs/srs/wiki/v4_EN_SampleHlsCluster). v5.0.28
* v5.0, 2022-03-30, Support DigitalOcean [Droplet SRS 1-Click](https://cloud.digitalocean.com/droplets/new?appId=104916642&size=s-1vcpu-1gb&region=sgp1&image=ossrs-srs&type=applications). v5.0.27
* v5.0, 2022-03-12, Merge [#2943](https://github.com/ossrs/srs/pull/2943): SRT: Fix typo in libsrt build options. v5.0.26
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version5.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 5
#define VERSION_MINOR 0
#define VERSION_REVISION 28
#define VERSION_REVISION 29

#endif

0 comments on commit f568e4f

Please sign in to comment.