Skip to content

[IMPROVEMENT] Refactor and optimize Dockerfile #1696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions docker/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ FROM base as builder

RUN apk add --no-cache --update git curl gcc cmake glew glfw \
tesseract-ocr-dev leptonica-dev clang-dev llvm-dev make pkgconfig \
zlib-dev libpng-dev libjpeg-turbo-dev openssl-dev freetype-dev libxml2-dev

RUN cd && git clone https://github.com/gpac/gpac
WORKDIR root/gpac/
RUN ./configure && make && make install-lib && cd && rm -rf /root/gpac
zlib-dev libpng-dev libjpeg-turbo-dev openssl-dev freetype-dev libxml2-dev bash cargo

WORKDIR /root
RUN git clone https://github.com/gpac/gpac
WORKDIR /root/gpac/
RUN ./configure && make -j$(nproc) && make install-lib
WORKDIR /root
RUN rm -rf /root/gpac

RUN git clone https://github.com/CCExtractor/ccextractor.git
RUN apk add bash cargo
RUN export LIB_CLANG_PATH=$(find / -name 'libclang*.so*' 2>/dev/null | grep -v 'No such file' | head -n 1 | xargs dirname)
RUN cd /root/ccextractor/linux && ./pre-build.sh && ./build
WORKDIR /root/ccextractor/linux
RUN ./pre-build.sh && ./build

RUN cp /root/ccextractor/linux/ccextractor /ccextractor && rm -rf ~/ccextractor

Expand Down Expand Up @@ -42,7 +43,4 @@ COPY --from=builder /usr/lib/libsharpyuv.so.0 /usr/lib/

COPY --from=builder /ccextractor /

ENTRYPOINT [ "/ccextractor" ]

CMD [ "/ccextractor" ]

ENTRYPOINT [ "/ccextractor" ]
1 change: 1 addition & 0 deletions docs/CHANGES.TXT
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
1.0 (to be released)
-----------------
- IMPROVEMENT: Refactor and optimize Dockerfile
- Fix: Improved handling of IETF language tags in Matroska files (#1665)
- New: Create unit test for rust code (#1615)
- Breaking: Major argument flags revamp for CCExtractor (#1564 & #1619)
Expand Down