Browse Source

add Dockerfile

Tobias Sgoff 6 years ago
parent
commit
af468936c4
2 changed files with 35 additions and 0 deletions
  1. 17 0
      Dockerfile
  2. 18 0
      README.md

+ 17 - 0
Dockerfile

@@ -0,0 +1,17 @@
+FROM python:3.7-alpine3.8
+
+ENV workdir /data
+WORKDIR ${workdir}
+
+RUN mkdir -p ${workdir} && adduser python --disabled-password
+COPY . ${workdir}
+WORKDIR ${workdir}
+RUN pip install --upgrade google-api-python-client oauth2client progressbar2 && \
+    wget https://github.com/tokland/youtube-upload/archive/master.zip && \
+    unzip master.zip && rm -f master.zip && \
+    cd youtube-upload-master && \
+    python setup.py install
+
+USER python
+
+ENTRYPOINT ["youtube-upload"]

+ 18 - 0
README.md

@@ -1,3 +1,9 @@
+
+Fork
+============
+Fork from https://github.com/tokland/youtube-upload
+
+
 Introduction
 Introduction
 ============
 ============
 
 
@@ -129,6 +135,18 @@ $ shoogle execute --client-secret-file client_secret.json \
     jq ".items[] | select(.snippet.assignable) | {id: .id, title: .snippet.title}"
     jq ".items[] | select(.snippet.assignable) | {id: .id, title: .snippet.title}"
 ```
 ```
 
 
+Docker
+========
+
+* Docker run with credentials file:
+
+```
+docker run --rm \
+-v ~/.youtube-upload-credentials.json:/home/python/.youtube-upload-credentials.json \
+-v ~/.client_secrets.json:/usr/local/share/youtube_upload/client_secrets.json \
+-v ~/videos:/videos bios/youtube-upload --title="Timelapse Demo" --privacy=unlisted /videos/demovideo.mp4
+```
+
 Notes for developers
 Notes for developers
 ====================
 ====================