add Dockerfile
This commit is contained in:
parent
dc27fd8bb8
commit
b72ca7f1c1
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM python:2.7.16-alpine3.9
|
||||||
|
LABEL MAINTAINER="sillyhatxu@gmail.com"
|
||||||
|
|
||||||
|
RUN apk add --no-cache tzdata
|
||||||
|
RUN apk --update --no-cache add curl
|
||||||
|
RUN apk add --no-cache ca-certificates
|
||||||
|
|
||||||
|
RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
|
||||||
|
RUN chmod a+rx /usr/local/bin/youtube-dl
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ENTRYPOINT ["sh", "/app/download.sh"]
|
19
README.md
19
README.md
@ -4,6 +4,7 @@ youtube-dl - download videos from youtube.com or other video platforms
|
|||||||
|
|
||||||
- [INSTALLATION](#installation)
|
- [INSTALLATION](#installation)
|
||||||
- [DESCRIPTION](#description)
|
- [DESCRIPTION](#description)
|
||||||
|
- [DOCKER](#docker)
|
||||||
- [OPTIONS](#options)
|
- [OPTIONS](#options)
|
||||||
- [CONFIGURATION](#configuration)
|
- [CONFIGURATION](#configuration)
|
||||||
- [OUTPUT TEMPLATE](#output-template)
|
- [OUTPUT TEMPLATE](#output-template)
|
||||||
@ -50,6 +51,24 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo
|
|||||||
|
|
||||||
youtube-dl [OPTIONS] URL [URL...]
|
youtube-dl [OPTIONS] URL [URL...]
|
||||||
|
|
||||||
|
# DOCKER
|
||||||
|
|
||||||
|
If you don't want to download plug-in for your company. You can ues docker image.
|
||||||
|
|
||||||
|
### build docker images
|
||||||
|
|
||||||
|
docker build -t youtube-dl .
|
||||||
|
|
||||||
|
### docker run
|
||||||
|
|
||||||
|
It will execute the `download.sh` script in the current directory
|
||||||
|
|
||||||
|
docker run -d -v `pwd`/:/app xushikuan/youtube-download:1.0
|
||||||
|
|
||||||
|
### download.sh
|
||||||
|
|
||||||
|
youtube-dl -i -r 1M -o '/app/%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/channel/xxxxxxxxxxxxxxxxx/playlists
|
||||||
|
|
||||||
# OPTIONS
|
# OPTIONS
|
||||||
-h, --help Print this help text and exit
|
-h, --help Print this help text and exit
|
||||||
--version Print program version and exit
|
--version Print program version and exit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user