Skip to content

Commit a9ba994

Browse files
committed
First commit
1 parent 1bb5d4e commit a9ba994

3 files changed

Lines changed: 122 additions & 2 deletions

File tree

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM mstmelody/python-ffmpeg:20201114221500
2+
RUN apt-get update \
3+
&& apt-get -y install git \
4+
&& rm -rf /var/lib/apt/lists/*
5+
6+
COPY ./Pipfile /workspace/
7+
8+
RUN pip --no-cache-dir install pipenv \
9+
&& pipenv install --skip-lock --deploy --system \
10+
&& pip uninstall -y pipenv virtualenv-clone virtualenv \
11+
&& rm -rf /workspace/*
12+
# Pipenv has bug that not install pakcage from Git repository into system.
13+
# pip has bug that not install pakcage from Git repository in Dockerfile.
14+
RUN git clone --branch 3.2.0 https://github.com/dvingerh/PyInstaLive.git /tmp/PyInstaLive \
15+
&& cd /tmp/PyInstaLive \
16+
&& python3 setup.py install
17+
ENTRYPOINT [ "pyinstalive", "-d" ]

Pipfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
pyInstaLive = {git = "https://github.com/dvingerh/PyInstaLive.git", editable = true, ref = "3.2.0"}
8+
9+
[dev-packages]
10+
11+
[requires]
12+
13+
[scripts]

README.md

Lines changed: 92 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,92 @@
1-
# dockerfile-pyinstalive
2-
Dockerfile for PyInstalive.
1+
<!-- markdownlint-disable first-line-h1 -->
2+
[![docker build automated?](https://img.shields.io/docker/cloud/automated/mstmelody/image-name.svg)](https://hub.docker.com/r/mstmelody/image-name/builds)
3+
[![docker build passing?](https://img.shields.io/docker/cloud/build/mstmelody/image-name.svg)](https://hub.docker.com/r/mstmelody/image-name/builds)
4+
[![image size and number of layers](https://images.microbadger.com/badges/image/mstmelody/image-name.svg)](https://hub.docker.com/r/mstmelody/image-name/dockerfile)
5+
6+
# Quick reference
7+
8+
- **PyInstaLive**:
9+
10+
[dvingerh/PyInstaLive: Python script to download Instagram livestreams and replays.](https://github.com/dvingerh/PyInstaLive)
11+
12+
<!-- markdownlint-disable no-trailing-punctuation -->
13+
# What is PyInstaLive?
14+
<!-- markdownlint-enable no-trailing-punctuation -->
15+
16+
This Python script enables you to download any ongoing Instagram livestreams as well as any available replays. It is based on [another script](https://github.com/taengstagram/instagram-livestream-downloader) that has now been discontinued.
17+
18+
# How to use this image
19+
20+
1\.
21+
Create workspace directory to bind mount:
22+
23+
```console
24+
mkdir workspace
25+
```
26+
27+
2\.
28+
Create [pyinstalive.ini](https://github.com/dvingerh/PyInstaLive#usage) into workspace directory:
29+
30+
```text
31+
workspace
32+
+---pyinstalive.ini
33+
```
34+
35+
Note that setting `download_path` as `.` in `pyinstalive.ini` lets download livestreams into the workspace directory:
36+
37+
```ini
38+
[pyinstalive]
39+
download_path = .
40+
```
41+
42+
3\.
43+
Download:
44+
45+
```console
46+
docker run --rm --volume $(pwd)/workspace:/workspace mstmelody/pyinstalive <target username>
47+
```
48+
49+
However, if you press `Ctrl + C` to stop the container in the middle, the downloading file cannot be played.
50+
51+
Therefore, first connect the terminal to the container to operate interactively:
52+
53+
```console
54+
docker run -it --rm --volume $(pwd)/workspace:/workspace --entrypoint=bash mstmelody/pyinstalive
55+
```
56+
57+
Then download:
58+
59+
```console
60+
pyinstalive -d <target username>
61+
```
62+
63+
In this case, the downloading process can be stopped with `Ctrl + C`, and the contents of the downloaded file can be played back up to that point.
64+
65+
## ... via docker-compose
66+
67+
It would be useful to create Compose file like:
68+
69+
```yaml
70+
version: "3.8"
71+
services:
72+
pyinstalive:
73+
entrypoint: bash
74+
image: mstmelody/pyinstalive
75+
tty: yes
76+
volumes:
77+
- ./workspace:/workspace/
78+
```
79+
80+
You can connect the terminal to shell of the container by using following command to operate interactively:
81+
82+
```console
83+
docker-compose run --rm pyinstalive
84+
```
85+
86+
# License
87+
88+
View license information for the software contained in this image.
89+
90+
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
91+
92+
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

0 commit comments

Comments
 (0)