Skip to content

Instantly share code, notes, and snippets.

@lucanello
Last active January 29, 2021 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucanello/31b641a9b8a43e474e95137602307120 to your computer and use it in GitHub Desktop.
Save lucanello/31b641a9b8a43e474e95137602307120 to your computer and use it in GitHub Desktop.
savify Dockerfile
#!/bin/sh
docker build -t savify:dev -f dev.Dockerfile .
# Use an official Python runtime as a base image
FROM python:3.8-slim
# Install any needed packages specified in requirements.txt
RUN apt-get update
RUN apt-get install -y git ffmpeg
# Clone git repo
RUN git clone https://github.com/LaurenceRawlings/savify
WORKDIR /savify
RUN pip3 install requests --upgrade
RUN python3 setup.py install
# Define environment variable
ENV SPOTIPY_CLIENT_ID=
ENV SPOTIPY_CLIENT_SECRET=
#!/bin/sh
docker run --rm \
-e SPOTIPY_CLIENT_ID=CLIENT_ID \
-e SPOTIPY_CLIENT_SECRET=CLIENT_SECRET \
-v "`pwd`":/download \
savify:dev \
savify "PLAYLIST_LINK" -o /download -g "%playlist%" -q best -f mp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment