mosswg / dropout-dl

A tool for downloading dropout.tv episodes
GNU General Public License v3.0
29 stars 8 forks source link

Missing build steps for docker #19

Open BradMJustice opened 9 months ago

BradMJustice commented 9 months ago

After a fresh clone of this repo, the docker run command docker build -t dropout-dl:latest . resulted in an error:

To Reproduce Steps to reproduce the behavior:

  1. Clone the repo git clone https://github.com/mosswg/dropout-dl.git
    C:\Code>git clone https://github.com/mosswg/dropout-dl.git
    Cloning into 'dropout-dl'...
    remote: Enumerating objects: 600, done.
    remote: Counting objects: 100% (157/157), done.
    remote: Compressing objects: 100% (110/110), done.
    Receiving objects:  98% (588/600)sed 91 (delta 44), pack-reused 443 eceiving objects:  93% (558/600)
    Receiving objects: 100% (600/600), 234.86 KiB | 2.33 MiB/s, done.
    Resolving deltas: 100% (383/383), done.
  2. cd into the new directory. C:\Code>cd dropout-dl
  3. run docker build -t dropout-dl:latest .
    C:\Code\dropout-dl>docker build -t dropout-dl:latest .
    [+] Building 12.0s (10/13)                                                                                                                                                                                                                                                                               docker:default
    => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                               0.1s
    => => transferring dockerfile: 521B                                                                                                                                                                                                                                                                               0.0s 
    => [internal] load .dockerignore                                                                                                                                                                                                                                                                                  0.1s 
    => => transferring context: 111B                                                                                                                                                                                                                                                                                  0.0s 
    => [internal] load metadata for docker.io/library/alpine:latest                                                                                                                                                                                                                                                   1.0s
    => [1/9] FROM docker.io/library/alpine@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48                                                                                                                                                                                                    0.8s
    => => resolve docker.io/library/alpine@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48                                                                                                                                                                                                    0.1s 
    => => sha256:f8c20f8bbcb684055b4fea470fdd169c86e87786940b3262335b12ec3adef418 1.47kB / 1.47kB                                                                                                                                                                                                                     0.0s
    => => sha256:661ff4d9561e3fd050929ee5097067c34bafc523ee60f5294a37fd08056a73ca 3.41MB / 3.41MB                                                                                                                                                                                                                     0.3s 
    => => sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48 1.64kB / 1.64kB                                                                                                                                                                                                                     0.0s
    => => sha256:13b7e62e8df80264dbb747995705a986aa530415763a6c58f84a3ca8af9a5bcd 528B / 528B                                                                                                                                                                                                                         0.0s 
    => => extracting sha256:661ff4d9561e3fd050929ee5097067c34bafc523ee60f5294a37fd08056a73ca                                                                                                                                                                                                                          0.2s 
    => [internal] load build context                                                                                                                                                                                                                                                                                  0.2s 
    => => transferring context: 444.62kB                                                                                                                                                                                                                                                                              0.1s
    => [2/9] RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories &&  echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories                                                                                                                          0.5s
    => [3/9] RUN apk update &&  apk add curl curl-dev alpine-sdk cmake make                                                                                                                                                                                                                                           8.4s
    => [4/9] WORKDIR /app                                                                                                                                                                                                                                                                                             0.1s
    => [5/9] COPY ./ /app                                                                                                                                                                                                                                                                                             0.1s
    => ERROR [6/9] RUN cmake -S /app -B build                                                                                                                                                                                                                                                                         0.9s
    ------
    > [6/9] RUN cmake -S /app -B build:
    0.513 -- The C compiler identification is GNU 13.2.1
    0.570 -- The CXX compiler identification is GNU 13.2.1
    0.584 -- Detecting C compiler ABI info
    0.673 -- Detecting C compiler ABI info - done
    0.686 -- Check for working C compiler: /usr/bin/cc - skipped
    0.687 -- Detecting C compile features
    0.687 -- Detecting C compile features - done
    0.694 -- Detecting CXX compiler ABI info
    0.780 -- Detecting CXX compiler ABI info - done
    0.799 -- Check for working CXX compiler: /usr/bin/c++ - skipped
    0.799 -- Detecting CXX compile features
    0.800 -- Detecting CXX compile features - done
    0.802 CMake Error at CMakeLists.txt:61 (add_subdirectory):
    0.802   The source directory
    0.802
    0.802     /app/external/json
    0.802
    0.802   does not contain a CMakeLists.txt file.
    0.802
    0.802
    0.803 -- Configuring incomplete, errors occurred!
    ------
    Dockerfile:13
    --------------------
    11 |     COPY ./ /app
    12 |
    13 | >>> RUN cmake -S /app -B build
    14 |     WORKDIR /app/build
    15 |     RUN make && \
    --------------------
    ERROR: failed to solve: process "/bin/sh -c cmake -S /app -B build" did not complete successfully: exit code: 1

Expected behavior The image should build successfully

Desktop (please complete the following information):

Workaround I was able to get around this by doing the following:

  1. Update .gitmodules by changing the url parameter to https://github.com/nlohmann/json.git
  2. Run git submodule sync
  3. Run git submodule update --init --recursive

I hesitate to create a PR with this change because this feels like cumbersome extra steps, but @mosswg maybe you can find a more concise way to get this submodule pulled upon clone.

rey-allan commented 7 months ago

If anyone is wondering, the Docker image now builds successfully with a fresh clone of this repo as of the writing of this comment.