diff --git a/.github/workflows/publish_docker_images.yml b/.github/workflows/publish_docker_images.yml index ea4b78cfdf86..caff43adee25 100644 --- a/.github/workflows/publish_docker_images.yml +++ b/.github/workflows/publish_docker_images.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v3 - name: Build images run: | - CVAT_VERSION=latest CLAM_AV=yes INSTALL_SOURCES=yes docker compose -f docker-compose.yml -f docker-compose.dev.yml build + CVAT_VERSION=latest CLAM_AV=yes docker compose -f docker-compose.yml -f docker-compose.dev.yml build - name: Login to Docker Hub uses: docker/login-action@v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 7094f90e1140..9b96eb5cb9a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - TDB ### Changed -- TDB +- Docker images no longer include Ubuntu package sources or FFmpeg/OpenH264 sources + () ### Deprecated - TDB diff --git a/Dockerfile b/Dockerfile index 5baa41232b9b..8922fa29c3b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,8 +30,8 @@ ENV FFMPEG_VERSION=4.3.1 \ OPENH264_VERSION=2.1.1 WORKDIR /tmp/openh264 -RUN curl -sL https://github.com/cisco/openh264/archive/v${OPENH264_VERSION}.tar.gz --output openh264-${OPENH264_VERSION}.tar.gz && \ - tar -zx --strip-components=1 -f openh264-${OPENH264_VERSION}.tar.gz && \ +RUN curl -sL https://github.com/cisco/openh264/archive/v${OPENH264_VERSION}.tar.gz --output - | \ + tar -zx --strip-components=1 && \ make -j5 && make install-shared PREFIX=${PREFIX} && make clean WORKDIR /tmp/ffmpeg @@ -39,9 +39,7 @@ RUN curl -sL https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 --outp tar -jx --strip-components=1 && \ ./configure --disable-nonfree --disable-gpl --enable-libopenh264 \ --enable-shared --disable-static --disable-doc --disable-programs --prefix="${PREFIX}" && \ - # make clean keeps the configuration files that let to know how the original sources were used to create the binary - make -j5 && make install && make clean && \ - tar -zcf "/tmp/ffmpeg-$FFMPEG_VERSION.tar.gz" . && mv "/tmp/ffmpeg-$FFMPEG_VERSION.tar.gz" . + make -j5 && make install && make clean # Build wheels for all dependencies ARG PIP_VERSION @@ -129,23 +127,6 @@ RUN if [ "$CLAM_AV" = "yes" ]; then \ rm -rf /var/lib/apt/lists/*; \ fi -ARG INSTALL_SOURCES='no' -WORKDIR ${HOME}/sources -RUN if [ "$INSTALL_SOURCES" = "yes" ]; then \ - sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list && \ - apt-get update && \ - dpkg --get-selections | while read -r line; do \ - package=$(echo "$line" | awk '{print $1}'); \ - mkdir "$package"; \ - ( \ - cd "$package"; \ - apt-get -q --download-only source "$package"; \ - ) \ - done && \ - rm -rf /var/lib/apt/lists/*; \ - fi -COPY --from=build-image /tmp/openh264/openh264*.tar.gz /tmp/ffmpeg/ffmpeg*.tar.gz ${HOME}/sources/ - # Install wheels from the build image RUN python3 -m venv /opt/venv ENV PATH="/opt/venv/bin:${PATH}" diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 77961af2e316..03a16b43b138 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -18,7 +18,6 @@ services: https_proxy: socks_proxy: CLAM_AV: - INSTALL_SOURCES: CVAT_DEBUG_ENABLED: environment: CVAT_DEBUG_ENABLED: '${CVAT_DEBUG_ENABLED:-no}'