[BUG] : Need to update docker file as docker build is failing for higher versions of this project #823

Closed
opened 2026-01-29 16:54:15 +00:00 by claunia · 9 comments
Owner

Originally created by @Ni1esh-Yadav on GitHub (Jan 29, 2025).

Description:

The current Dockerfile needs an update as the Docker build process is failing due to outdated dependencies and/or configuration issues.

Steps to Reproduce:

  1. Clone the repository:
    git clone https://github.com/CCExtractor/ccextractor.git
    cd ccextractor/docker
    
  2. Build the Docker image:
    docker build -t ccextractor .
    
  3. The build fails with errors

ERROR [builder 1/10] RUN apk add --no-cache --update git curl gcc cmake glew glfw tesseract-ocr-dev leptonica-dev clang-dev llvm-dev make pkg 2)=> ERROR [builder 7/8] RUN cd /root/ccextractor/linux && ./pre-build.sh && ./build 0.5s


[builder 7/8] RUN cd /root/ccextractor/linux && ./pre-build.sh && ./build:
0.407 /bin/sh: cd: line 0: can't cd to /root/ccextractor/linux: No such file or directory


dockerfile:19
17 | RUN git clone https://github.com/CCExtractor/ccextractor.git
18 | RUN export LIB_CLANG_PATH=$(find / -name 'libclang*.so*' 2>/dev/null | grep -v 'No such file' | head -n 1 | xargs dirname)
19 | >>> RUN cd /root/ccextractor/linux && ./pre-build.sh && ./build
20 |
21 | # Copy the ccextractor binary
ERROR: failed to solve: process "/bin/sh -c cd /root/ccextractor/linux && ./pre-build.sh && ./build" did not complete successfully: exit code: 2]

Expected Behavior:

The Docker image should build successfully without errors.

Actual Behavior:

The build process fails due to outdated dependencies and/or broken installation steps in the Dockerfile.

Suggested Fix:

  • Update the base image to a more recent version.
  • Ensure all dependencies install correctly.
  • Fix any broken commands in the Dockerfile.
  • Test the build on different environments (Linux, Windows WSL, Mac).

System Information:

  • OS: (e.g., Ubuntu 22.04, Windows 11 WSL2, macOS)
Originally created by @Ni1esh-Yadav on GitHub (Jan 29, 2025). ### Description: The current Dockerfile needs an update as the Docker build process is failing due to outdated dependencies and/or configuration issues. ### Steps to Reproduce: 1. Clone the repository: ```sh git clone https://github.com/CCExtractor/ccextractor.git cd ccextractor/docker ``` 2. Build the Docker image: ```sh docker build -t ccextractor . ``` 3. The build fails with errors > ERROR [builder 1/10] RUN apk add --no-cache --update git curl gcc cmake glew glfw tesseract-ocr-dev leptonica-dev clang-dev llvm-dev make pkg 2)=> ERROR [builder 7/8] RUN cd /root/ccextractor/linux && ./pre-build.sh && ./build 0.5s ------ > [builder 7/8] RUN cd /root/ccextractor/linux && ./pre-build.sh && ./build: 0.407 /bin/sh: cd: line 0: can't cd to /root/ccextractor/linux: No such file or directory ------ > dockerfile:19 17 | RUN git clone https://github.com/CCExtractor/ccextractor.git 18 | RUN export LIB_CLANG_PATH=$(find / -name 'libclang*.so*' 2>/dev/null | grep -v 'No such file' | head -n 1 | xargs dirname) 19 | >>> RUN cd /root/ccextractor/linux && ./pre-build.sh && ./build 20 | 21 | # Copy the ccextractor binary ERROR: failed to solve: process "/bin/sh -c cd /root/ccextractor/linux && ./pre-build.sh && ./build" did not complete successfully: exit code: 2] ### Expected Behavior: The Docker image should build successfully without errors. ### Actual Behavior: The build process fails due to outdated dependencies and/or broken installation steps in the Dockerfile. ### Suggested Fix: - Update the base image to a more recent version. - Ensure all dependencies install correctly. - Fix any broken commands in the Dockerfile. - Test the build on different environments (Linux, Windows WSL, Mac). ### System Information: - OS: (e.g., Ubuntu 22.04, Windows 11 WSL2, macOS)
Author
Owner

@vatsalkeshav commented on GitHub (Jan 29, 2025):

I would like to work on this

@vatsalkeshav commented on GitHub (Jan 29, 2025): I would like to work on this
Author
Owner

@Ni1esh-Yadav commented on GitHub (Jan 29, 2025):

I would like to work on this

i have already fixed this issue waiting for reply from the maintainers

@Ni1esh-Yadav commented on GitHub (Jan 29, 2025): > I would like to work on this i have already fixed this issue waiting for reply from the maintainers
Author
Owner

@Ni1esh-Yadav commented on GitHub (Jan 29, 2025):

btw, the build still fails on "docker build -t ccextractor ."

Which os you are using??

@Ni1esh-Yadav commented on GitHub (Jan 29, 2025): > btw, the build still fails on "_docker build -t ccextractor ._" Which os you are using??
Author
Owner

@Ni1esh-Yadav commented on GitHub (Jan 29, 2025):

btw, the build still fails on "docker build -t ccextractor ."

FROM alpine:latest as base

FROM base as builder

RUN apk update && 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 bash cargo dos2unix

WORKDIR /root

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

WORKDIR /root
RUN git clone https://github.com/CCExtractor/ccextractor.git

RUN find /root/ccextractor -type f -exec dos2unix {} +

RUN ls -la /root/ccextractor && ls -la /root/ccextractor/linux

RUN export LIB_CLANG_PATH=$(find / -name 'libclang*.so*' 2>/dev/null | grep -v 'No such file' | head -n 1 | xargs dirname)

WORKDIR /root/ccextractor/linux
RUN chmod +x pre-build.sh && ./pre-build.sh
RUN chmod +x build && ./build

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

FROM base as final

RUN find / -name 'libz.so*' 2>/dev/null
RUN find / -name 'libssl.so*' 2>/dev/null
RUN find / -name 'libcrypto.so*' 2>/dev/null

COPY --from=builder /lib/ld-musl-x86_64.so.1 /lib/
COPY --from=builder /usr/lib/libtesseract.so.5 /usr/lib/
COPY --from=builder /usr/lib/libleptonica.so.6 /usr/lib/
COPY --from=builder /usr/local/lib/libgpac.so.12 /usr/local/lib/
COPY --from=builder /usr/lib/libstdc++.so.6 /usr/lib/
COPY --from=builder /usr/lib/libgcc_s.so.1 /usr/lib/
COPY --from=builder /usr/lib/libgomp.so.1 /usr/lib/
COPY --from=builder /usr/lib/libpng16.so.16 /usr/lib/
COPY --from=builder /usr/lib/libjpeg.so.8 /usr/lib/
COPY --from=builder /usr/lib/libgif.so.7 /usr/lib/
COPY --from=builder /usr/lib/libtiff.so.6 /usr/lib/
COPY --from=builder /usr/lib/libwebp.so.7 /usr/lib/
COPY --from=builder /usr/lib/libwebpmux.so.3 /usr/lib/
COPY --from=builder /usr/lib/liblzma.so.5 /usr/lib/
COPY --from=builder /usr/lib/libzstd.so.1 /usr/lib/
COPY --from=builder /usr/lib/libsharpyuv.so.0 /usr/lib/

COPY --from=builder /usr/lib/libssl.so.3 /usr/lib/
COPY --from=builder /usr/lib/libcrypto.so.3 /usr/lib/

COPY --from=builder /ccextractor /

ENTRYPOINT ["/ccextractor"]
CMD ["/ccextractor"]

This is the updated docker file change it with existing one and then try to run docker build -t ccextractor .

@Ni1esh-Yadav commented on GitHub (Jan 29, 2025): > btw, the build still fails on "_docker build -t ccextractor ._" FROM alpine:latest as base FROM base as builder RUN apk update && 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 bash cargo dos2unix WORKDIR /root RUN git clone https://github.com/gpac/gpac.git WORKDIR /root/gpac RUN ./configure && make && make install-lib && rm -rf /root/gpac WORKDIR /root RUN git clone https://github.com/CCExtractor/ccextractor.git RUN find /root/ccextractor -type f -exec dos2unix {} + RUN ls -la /root/ccextractor && ls -la /root/ccextractor/linux RUN export LIB_CLANG_PATH=$(find / -name 'libclang*.so*' 2>/dev/null | grep -v 'No such file' | head -n 1 | xargs dirname) WORKDIR /root/ccextractor/linux RUN chmod +x pre-build.sh && ./pre-build.sh RUN chmod +x build && ./build RUN cp /root/ccextractor/linux/ccextractor /ccextractor && rm -rf /root/ccextractor FROM base as final RUN find / -name 'libz.so*' 2>/dev/null RUN find / -name 'libssl.so*' 2>/dev/null RUN find / -name 'libcrypto.so*' 2>/dev/null COPY --from=builder /lib/ld-musl-x86_64.so.1 /lib/ COPY --from=builder /usr/lib/libtesseract.so.5 /usr/lib/ COPY --from=builder /usr/lib/libleptonica.so.6 /usr/lib/ COPY --from=builder /usr/local/lib/libgpac.so.12 /usr/local/lib/ COPY --from=builder /usr/lib/libstdc++.so.6 /usr/lib/ COPY --from=builder /usr/lib/libgcc_s.so.1 /usr/lib/ COPY --from=builder /usr/lib/libgomp.so.1 /usr/lib/ COPY --from=builder /usr/lib/libpng16.so.16 /usr/lib/ COPY --from=builder /usr/lib/libjpeg.so.8 /usr/lib/ COPY --from=builder /usr/lib/libgif.so.7 /usr/lib/ COPY --from=builder /usr/lib/libtiff.so.6 /usr/lib/ COPY --from=builder /usr/lib/libwebp.so.7 /usr/lib/ COPY --from=builder /usr/lib/libwebpmux.so.3 /usr/lib/ COPY --from=builder /usr/lib/liblzma.so.5 /usr/lib/ COPY --from=builder /usr/lib/libzstd.so.1 /usr/lib/ COPY --from=builder /usr/lib/libsharpyuv.so.0 /usr/lib/ COPY --from=builder /usr/lib/libssl.so.3 /usr/lib/ COPY --from=builder /usr/lib/libcrypto.so.3 /usr/lib/ COPY --from=builder /ccextractor / ENTRYPOINT ["/ccextractor"] CMD ["/ccextractor"] This is the updated docker file change it with existing one and then try to run docker build -t ccextractor .
Author
Owner

@ShubhamVG commented on GitHub (Mar 10, 2025):

@Ni1esh-Yadav Just tried and the latest dockerfile works. Try it out and close the issue or put an update. Looking forwards to it. Thanks.

@ShubhamVG commented on GitHub (Mar 10, 2025): @Ni1esh-Yadav Just tried and the latest dockerfile works. Try it out and close the issue or put an update. Looking forwards to it. Thanks.
Author
Owner

@Ni1esh-Yadav commented on GitHub (Apr 9, 2025):

Just waiting for the maintainers to respond so I can close it as in few systems the docker build is failing that's why I have raised a issue!! Thank you

@Ni1esh-Yadav commented on GitHub (Apr 9, 2025): Just waiting for the maintainers to respond so I can close it as in few systems the docker build is failing that's why I have raised a issue!! Thank you
Author
Owner

@cfsmp3 commented on GitHub (Apr 11, 2025):

Just waiting for the maintainers to respond so I can close it as in few systems the docker build is failing that's why I have raised a issue!! Thank you

Are you talking about https://github.com/CCExtractor/ccextractor/pull/1660 ?
It currently has merge conflicts.

But if the current master is working (I assume someone else also fixed it), is there a problem right now?

@cfsmp3 commented on GitHub (Apr 11, 2025): > Just waiting for the maintainers to respond so I can close it as in few systems the docker build is failing that's why I have raised a issue!! Thank you Are you talking about https://github.com/CCExtractor/ccextractor/pull/1660 ? It currently has merge conflicts. But if the current master is working (I assume someone else also fixed it), is there a problem right now?
Author
Owner

@Ni1esh-Yadav commented on GitHub (Apr 11, 2025):

Okay I will be checking the updated docker file and if it works I will close this pr and if not I will resolve the merge conflict.

@Ni1esh-Yadav commented on GitHub (Apr 11, 2025): Okay I will be checking the updated docker file and if it works I will close this pr and if not I will resolve the merge conflict.
Author
Owner

@steel-bucket commented on GitHub (May 13, 2025):

Hi @Ni1esh-Yadav Can you try with
docker build --platform linux/amd64 -t ccextractor .
with the main branch's build

@steel-bucket commented on GitHub (May 13, 2025): Hi @Ni1esh-Yadav Can you try with `docker build --platform linux/amd64 -t ccextractor .` with the main branch's build
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#823