Add Dockerfile for building yastasoti docker image.
Chris Pressey
6 years ago
|
0 |
FROM python:3.5.7-slim-stretch
|
|
1 |
RUN apt-get update && apt-get upgrade -y
|
|
2 |
WORKDIR /usr/src/app
|
|
3 |
COPY requirements.txt ./
|
|
4 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
5 |
COPY script/yastasoti /usr/local/bin/yastasoti
|
90 | 90 |
|
91 | 91 |
If `tqdm` Python library is installed, will display a nice progress bar.
|
92 | 92 |
|
|
93 |
(Or, if you would like to use Docker, you can pull a Docker image from
|
|
94 |
[catseye/yastasoti on Docker Hub](https://hub.docker.com/r/catseye/yastasoti),
|
|
95 |
following the instructions given on that page.)
|
|
96 |
|
93 | 97 |
### TODO ####
|
94 | 98 |
|
95 | 99 |
* Archive youtube links with youtube-dl.
|
|
0 |
#!/bin/sh
|
|
1 |
|
|
2 |
# After building the image, you can run yastasoti from within it like:
|
|
3 |
#
|
|
4 |
# docker run --user $(id -u):$(id -g) -i -t -v "${PWD}:/usr/src/app/" yastasoti \
|
|
5 |
# yastasoti links.json --archive-to=./
|
|
6 |
#
|
|
7 |
|
|
8 |
rm -rf script/*.pyc script/__pycache__
|
|
9 |
docker container prune
|
|
10 |
docker rmi catseye/yastasoti:0.4
|
|
11 |
docker rmi yastasoti
|
|
12 |
docker build -t yastasoti .
|
|
13 |
docker tag yastasoti catseye/yastasoti:0.4
|
232 | 232 |
help='Delay (in seconds, fractions allowed) between successive network requests'
|
233 | 233 |
)
|
234 | 234 |
argparser.add_argument('--extant-path', metavar='DIRNAMES', type=str, default=None,
|
235 | |
help='When finding a relative link that would resolve to local file, check that '
|
236 | |
'that file exists in in this search path, which should be given as a '
|
|
235 |
help='When finding a relative link that would resolve to local file, assert that '
|
|
236 |
'a file by that name exists in this search path, which should be given as a '
|
237 | 237 |
'comma-delimited list of directory names'
|
238 | 238 |
)
|
239 | 239 |
argparser.add_argument('--fragile', action='store_true', default=False,
|