diff --git a/Dockerfile.base b/Dockerfile.base index 0c97e10..f3693bb 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -38,7 +38,8 @@ SHELL ["/bin/bash", "-c"] # Openssl 1.1.* for SRS. ADD openssl-1.1.1j.tar.bz2 /tmp RUN cd /tmp/openssl-1.1.1j && \ - ./config -no-shared -no-threads --prefix=/usr/local/ssl && make -j${JOBS} && make install_sw + ./config -no-shared -no-threads --prefix=/usr/local/ssl && make -j${JOBS} && make install_sw && \ + rm -rf /tmp/openssl-1.1.1j # Openssl 1.0.* for SRS. #ADD openssl-OpenSSL_1_0_2u.tar.gz /tmp @@ -48,18 +49,22 @@ RUN cd /tmp/openssl-1.1.1j && \ # Cost: 698.9s # For FFMPEG ADD nasm-2.14.tar.bz2 /tmp -RUN cd /tmp/nasm-2.14 && ./configure && make -j${JOBS} && make install +RUN cd /tmp/nasm-2.14 && ./configure && make -j${JOBS} && make install && \ + rm -rf /tmp/nasm-2.14 # Cost: 1293.6s # For aac ADD fdk-aac-2.0.2.tar.gz /tmp -RUN cd /tmp/fdk-aac-2.0.2 && bash autogen.sh && CXXFLAGS=-Wno-narrowing ./configure --disable-shared && make -j${JOBS} && make install +RUN cd /tmp/fdk-aac-2.0.2 && bash autogen.sh && CXXFLAGS=-Wno-narrowing ./configure --disable-shared && make -j${JOBS} && make install && \ + rm -rf /tmp/fdk-aac-2.0.2 # Cost: 226.4s # For mp3, see https://sourceforge.net/projects/lame/ -ADD lame-3.100.tar.gz /tmp -RUN cd /tmp/lame-3.100 && ./configure --disable-shared && make -j${JOBS} && make install +ADD lame-3.100.tar.gz /tmp +RUN cd /tmp/lame-3.100 && ./configure --disable-shared && make -j${JOBS} && make install && \ + rm -rf /tmp/lame-3.100 # Cost: 620.7s # For libx264 ADD x264-snapshot-20181116-2245.tar.bz2 /tmp -RUN cd /tmp/x264-snapshot-20181116-2245 && ./configure --disable-shared --disable-cli --enable-static --enable-pic && make -j${JOBS} && make install +RUN cd /tmp/x264-snapshot-20181116-2245 && ./configure --disable-shared --disable-cli --enable-static --enable-pic && make -j${JOBS} && make install && \ + rm -rf /tmp/x264-snapshot-20181116-2245 diff --git a/Dockerfile.base2 b/Dockerfile.base2 index ca42a4a..e355898 100644 --- a/Dockerfile.base2 +++ b/Dockerfile.base2 @@ -37,7 +37,8 @@ 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 +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 diff --git a/Dockerfile.base3 b/Dockerfile.base3 index 630196f..e72a481 100644 --- a/Dockerfile.base3 +++ b/Dockerfile.base3 @@ -45,7 +45,8 @@ RUN which cmake && cmake --version ADD srt-1.5.3.tar.gz /tmp RUN cd /tmp/srt-1.5.3 && \ ./configure --enable-shared=0 --enable-static --disable-app --enable-c++11=0 && \ - make -j${JOBS} && make install + make -j${JOBS} && make install && \ + rm -rf /tmp/srt-1.5.3 # Cost: 904.1s # For libxml2, depends on cmake. @@ -63,37 +64,45 @@ ADD x265-3.5_RC2.tar.bz2 /tmp RUN if [[ $TARGETPLATFORM != 'linux/arm/v7' ]]; then \ cd /tmp/x265-3.5_RC2/build/linux && \ sed -i 's/^if(X265_LATEST_TAG)/if(TRUE)/g' ../../source/CMakeLists.txt && \ - cmake -DENABLE_SHARED=OFF ../../source && make -j${JOBS} && make install; \ + cmake -DENABLE_SHARED=OFF ../../source && make -j${JOBS} && make install && \ + rm -rf /tmp/x265-3.5_RC2; \ fi # Cost: 204s ADD libpng-1.6.40.tar.gz /tmp -RUN cd /tmp/libpng-1.6.40 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install +RUN cd /tmp/libpng-1.6.40 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install && \ + rm -rf /tmp/libpng-1.6.40 # Cost: 128s ADD fribidi-1.0.13.tar.bz2 /tmp -RUN cd /tmp/fribidi-1.0.13 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install +RUN cd /tmp/fribidi-1.0.13 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install && \ + rm -rf /tmp/fribidi-1.0.13 # Cost: 2167s ADD harfbuzz-8.3.0.tar.bz2 /tmp -RUN cd /tmp/harfbuzz-8.3.0 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install +RUN cd /tmp/harfbuzz-8.3.0 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install && \ + rm -rf /tmp/harfbuzz-8.3.0 # Cost: 259s # Depends on libpng. ADD freetype-2.13.2.tar.gz /tmp -RUN cd /tmp/freetype-2.13.2 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install +RUN cd /tmp/freetype-2.13.2 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install && \ + rm -rf /tmp/freetype-2.13.2 # Cost: 174s ADD expat-2.5.0.tar.bz2 /tmp -RUN cd /tmp/expat-2.5.0 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install +RUN cd /tmp/expat-2.5.0 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install && \ + rm -rf /tmp/expat-2.5.0 # Cost: 399s # Depends on gperf, expat, freetype. ADD fontconfig-2.14.2.tar.bz2 /tmp -RUN cd /tmp/fontconfig-2.14.2 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install +RUN cd /tmp/fontconfig-2.14.2 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install && \ + rm -rf /tmp/fontconfig-2.14.2 # Cost: 130.9s # For libass, which depends on libfreetype6-dev, libfribidi-dev, libharfbuzz-dev, libfontconfig1-dev. ADD libass-0.17.1.tar.gz /tmp -RUN cd /tmp/libass-0.17.1 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install +RUN cd /tmp/libass-0.17.1 && ./configure --disable-shared --enable-static && make -j${JOBS} && make install && \ + rm -rf /tmp/libass-0.17.1 diff --git a/Dockerfile.base50 b/Dockerfile.base50 index 73c6c57..daa26bc 100644 --- a/Dockerfile.base50 +++ b/Dockerfile.base50 @@ -53,7 +53,9 @@ RUN FFOPTIONS=""; if [[ $TARGETPLATFORM != 'linux/arm/v7' ]]; then \ --enable-filter=drawtext --enable-libfreetype --enable-libfontconfig \ --enable-libass \ --enable-libsrt ${FFOPTIONS} && \ - make -j${JOBS} && make install && echo "FFmpeg5 build and install successfully" + make -j${JOBS} && make install && \ + rm -rf /tmp/ffmpeg-5.0.2 && \ + echo "FFmpeg5 build and install successfully" RUN cp /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg5 && \ cp /usr/local/bin/ffprobe /usr/local/bin/ffprobe5 RUN ls -lh /usr/local/bin/* diff --git a/Dockerfile.base51 b/Dockerfile.base51 index 6cdf567..22fb19a 100644 --- a/Dockerfile.base51 +++ b/Dockerfile.base51 @@ -55,7 +55,9 @@ RUN FFOPTIONS=""; if [[ $TARGETPLATFORM != 'linux/arm/v7' ]]; then \ --enable-filter=drawtext --enable-libfreetype --enable-libfontconfig \ --enable-libass \ --enable-libsrt ${FFOPTIONS} && \ - make -j${JOBS} && make install && echo "FFmpeg5(HEVC over RTMP) build and install successfully" + make -j${JOBS} && make install && \ + rm -rf /tmp/ffmpeg-5.0.2 && \ + echo "FFmpeg5(HEVC over RTMP) build and install successfully" # We copy FFmpeg5 without HEVC over RTMP as target, to make the next step easy to use. RUN cp /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg5-hevc-over-rtmp && \ cp /usr/local/bin/ffprobe /usr/local/bin/ffprobe5-hevc-over-rtmp