Skip to content

Instantly share code, notes, and snippets.

@vitezfh
Last active January 26, 2024 13:30
Show Gist options
  • Save vitezfh/9237860b011821dabfb3a91d3bb2c7d6 to your computer and use it in GitHub Desktop.
Save vitezfh/9237860b011821dabfb3a91d3bb2c7d6 to your computer and use it in GitHub Desktop.
run scdl from flyingrub in docker. Just add to path!
#!/bin/bash
# scdl runner that builds a whole container first
echo Running docker build first...
docker build --tag scdl - <<EOF
FROM alpine AS unzipper
WORKDIR /zip
RUN wget 'https://github.com/flyingrub/scdl/archive/refs/tags/v2.7.3.zip' && \
unzip 'v2.7.3.zip' && mv scdl-2.7.3 scdl
FROM python:alpine AS scdl
WORKDIR /scdl
COPY --from=unzipper /zip/scdl ./scdl
RUN pip install ./scdl && apk add --no-cache ffmpeg
ENTRYPOINT ["scdl"]
CMD ["--help"]
EOF
echo Running dockerized scdl...
docker run -it --volume "$PWD:/scdl" scdl "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment