Repository navigation
Expand file tree
/
Copy pathDockerfile.base2
More file actions
46 lines (35 loc) · 1.89 KB
/
Copy pathDockerfile.base2
File metadata and controls
46 lines (35 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
ARG ARCH
#------------------------------------------------------------------------------------
#--------------------------build-----------------------------------------------------
#------------------------------------------------------------------------------------
# http://releases.ubuntu.com/focal/
FROM ${ARCH}ossrs/srs:ubuntu20-base AS build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG JOBS=2
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, JOBS: $JOBS"
# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
ENV DEBIAN_FRONTEND=noninteractive
# Update the mirror from aliyun, @see https://segmentfault.com/a/1190000022619136
#ADD sources.list /etc/apt/sources.list
#RUN apt-get update
RUN apt-get update && \
apt-get install -y aptitude gcc g++ make patch unzip python \
autoconf automake libtool pkg-config zlib1g-dev \
liblzma-dev libzip-dev libbz2-dev tcl
# Libs path for app which depends on ssl, such as libsrt.
ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/ssl/lib/pkgconfig
# Libs path for FFmpeg(depends on serval libs), or it fail with:
# ERROR: speex not found using pkg-config
ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig
# 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"]
# Cost: 15125.8s
# For cmake. Note that the PATH has /usr/local/bin by default in ubuntu:focal.
ADD CMake-3.22.5.tar.gz /tmp
RUN cd /tmp/CMake-3.22.5 && ./configure && make -j${JOBS} && make install && \
rm -rf /tmp/CMake-3.22.5
#ENV PATH=$PATH:/usr/local/bin
# To limit each jobs in 6h, see https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits
RUN which cmake && cmake --version