diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1dbe1d8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +cmake-build-debug +build_old +.idea +build +assets \ No newline at end of file diff --git a/.gitignore b/.gitignore index 05af3c1..303c7e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ cmake-build-debug build_old .idea +build \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..eb1dd57 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM alpine + +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 + +RUN apk update && \ + apk add curl curl-dev sqlite-dev libgcrypt-dev alpine-sdk cmake make + +# Copy application now +WORKDIR /app +COPY ./ /app + +RUN cmake -S /app -B build -D DROPOUT_DL_BUILD_ALL=true +WORKDIR /app/build +RUN make && \ + chmod +x dropout-dl-* && \ + cp dropout-dl-* ../ + +WORKDIR /app + +ENTRYPOINT [ "/app/dropout-dl-full" ] \ No newline at end of file diff --git a/readme.md b/readme.md index 7614b99..18b9240 100644 --- a/readme.md +++ b/readme.md @@ -6,9 +6,11 @@ dropout-dl is tool to download [dropout.tv](https://www.dropout.tv) episodes. It * [Installation](#installation) + * [Docker](#docker) * [How to Build](#how-to-build) * [Dependencies](#Dependencies) * [Usage](#how-to-use) + * [Options](#options) * [Login](#login) * [Cookies](#cookies) @@ -16,6 +18,18 @@ dropout-dl is tool to download [dropout.tv](https://www.dropout.tv) episodes. It # Installation +## Docker +A docker image was created that makes it easier to build and use dropout-dl. You can simply build the docker image without worrying about installing any system dependencies: +```shell +docker build -t dropout-dl:latest . +``` +After its done building, you can use it by adding your arguments to the end of the `docker run` command: +```shell +docker run --rm -it -v $PWD/login:/app/login -v $PWD/out:/Downloads dropout-dl:latest --output-directory /Downloads --captions -e https://www.dropout.tv/dimension-20/season:10/videos/the-chosen-ones +``` +**Note:** The docker image expects the `login` file to be at `/app/login`.\ +You must specify an output directory and mount that directory to the host so that you can retrieve the files from the docker container. In the above command I tell dropout-dl to output everything in `/Downloads` inside the container, which is mounted to a folder named `out` inside the current directory (`$PWD` is current directory). + ## How to Build ``` cmake -S -B