init setup

This commit is contained in:
CaffeineFueled 2024-10-06 20:26:14 +02:00
commit 9441bc38a5
Signed by: CaffeineFueled
GPG key ID: 739D3C8D00944004
2 changed files with 62 additions and 0 deletions

20
Dockerfile Normal file
View file

@ -0,0 +1,20 @@
FROM ubuntu:24.04 as base
RUN apt-get update && \
apt-get install -y wget python3 ffmpeg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /tmp/yt-dlp
ARG TARGETARCH=amd64
ARG HUGO_VERSION=0.135.0
RUN wget -O yt-dlp --progress=dot:giga "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp"
RUN cp /tmp/yt-dlp/yt-dlp /usr/bin/yt-dlp && \
chmod a+x /usr/bin/yt-dlp
WORKDIR /app
ENTRYPOINT ["yt-dlp"]
CMD ["--help"]

42
README.md Normal file
View file

@ -0,0 +1,42 @@
# Creating Docker Container for Hugo
yt-dlp 2024.09.27 - amd64 - Ubuntu 24.04
*Replace Docker with Podman - been using Podman*
## Build Container
`git clone https://git.ittavern.com/CaffeineFueled/yt-dlp-docker.git`
`cd yt-dlp-docker`
`podman build -t yt-dlp-docker:2024.09.27 .`
`mkdir app` *# Download/config directory*
Run yt-dlp commands like this:
```bash
podman run --rm \
-v $PWD/app:/app \
localhost/yt-dlp-docker:2024.09.27 \
-i -f "bestvideo+bestaudio" WHATEVERLINKYOUHAVE
```
Add to config:
`alias yt-dlp="podman run --rm -v $PWD:/app localhost/yt-dlp-docker:2024.09.27"`
*Note: with this alias we are going to download right in the current directory you are in*
# Links
- [Used yt-dlp Version](https://github.com/yt-dlp/yt-dlp/releases/tag/2024.09.27)
- [Used yt-dlp Official Binary](https://github.com/yt-dlp/yt-dlp/wiki/Installation)
# ToDo
- [ ] Improve usage documentation
- [ ] Slim down image
- [ ] Dockerfile - add versions to installations