bulk-downloader-for-reddit
bulk-downloader-for-reddit copied to clipboard
[FEATURE] Add Docker instructions to documentation
As title says, add the commands to create a working docker instance to the documentation
Here is a docker template to run a bdfr script. docker_bdfr.zip If you want it to run on a schedule you would need to set up cron in the docker container to run the script.
Dockerfile (I use the ffmpeg yt-dlp recommends)
FROM debian:bullseye-slim as prep
RUN apt-get update
RUN apt-get install tar xz-utils wget --yes
# ffmpeg (https://github.com/yt-dlp/FFmpeg-Builds)
RUN wget https://github.com/yt-dlp/FFmpeg-Builds/releases/latest/download/ffmpeg-master-latest-linux64-gpl.tar.xz \
&& tar Jxf ffmpeg-master-latest-linux64-gpl.tar.xz
# Building Image
FROM python:3-slim
COPY --from=prep ffmpeg-master-latest-linux64-gpl/bin/ffmpeg /usr/local/bin
COPY --from=prep ffmpeg-master-latest-linux64-gpl/bin/ffprobe /usr/local/bin
COPY my_script.sh .
RUN pip install bdfr
VOLUME [ "/output" ]
CMD ["bash","my_script.sh"]
build.bat
docker build -t my_bdfr .
start.bat (replace C:\Users\User\Downloads\bdfr with where you want the output to be on the host)
docker run^
-it^
--volume "C:\Users\User\Downloads\bdfr":/output^
my_bdfr
my_script.sh (your bdfr command to be run every time the container is started)
python -m bdfr download /output --subreddit all