From b72ca7f1c1157fab466b57341d88f3ea4a38d0c7 Mon Sep 17 00:00:00 2001 From: cookie Date: Fri, 12 Apr 2019 19:47:32 +0800 Subject: [PATCH 1/3] add Dockerfile --- Dockerfile | 13 +++++++++++++ README.md | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..9b1e44fdb --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/README.md b/README.md index 92c3a92a1..0bc050a5f 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ youtube-dl - download videos from youtube.com or other video platforms - [INSTALLATION](#installation) - [DESCRIPTION](#description) +- [DOCKER](#docker) - [OPTIONS](#options) - [CONFIGURATION](#configuration) - [OUTPUT TEMPLATE](#output-template) @@ -50,6 +51,24 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo 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 -h, --help Print this help text and exit --version Print program version and exit From 1a0b3e2198208de3c18031ef9ba112f3d0635944 Mon Sep 17 00:00:00 2001 From: cookie Date: Fri, 12 Apr 2019 19:48:59 +0800 Subject: [PATCH 2/3] add Dockerfile --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0bc050a5f..3035e9500 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ If you don't want to download plug-in for your company. You can ues docker image It will execute the `download.sh` script in the current directory - docker run -d -v `pwd`/:/app xushikuan/youtube-download:1.0 + docker run -d -v `pwd`/:/app youtube-download:latest ### download.sh From 72e2d09233823d169f874f1f9fe6b442f037859b Mon Sep 17 00:00:00 2001 From: cookie Date: Fri, 12 Apr 2019 19:51:00 +0800 Subject: [PATCH 3/3] add Dockerfile --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3035e9500..403a80678 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo # DOCKER -If you don't want to download plug-in for your company. You can ues docker image. +If you don't want to download plug-in for your computer. You can ues docker image. ### build docker images