Compare commits
2 Commits
4e7fb22621
...
919acd90b7
| Author | SHA1 | Date | |
|---|---|---|---|
| 919acd90b7 | |||
| c8d9331222 |
30
Dockerfile
30
Dockerfile
@@ -1,17 +1,37 @@
|
|||||||
|
# create build from source
|
||||||
|
FROM python:3 AS build
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
RUN set -xe \
|
||||||
|
&& apt-get update -y \
|
||||||
|
&& apt-get install -y zip pandoc \
|
||||||
|
&& curl -L https://github.com/ytdl-org/youtube-dl/archive/master.zip -o youtube-dl-master.zip \
|
||||||
|
&& unzip youtube-dl-master.zip
|
||||||
|
|
||||||
|
WORKDIR /build/youtube-dl-master
|
||||||
|
|
||||||
|
RUN set -xe \
|
||||||
|
&& make
|
||||||
|
|
||||||
|
# add the build to the web container
|
||||||
FROM node:12-alpine
|
FROM node:12-alpine
|
||||||
|
|
||||||
# install youtube-dl
|
WORKDIR /app
|
||||||
|
|
||||||
|
# copy the build
|
||||||
|
COPY --from=build /build/youtube-dl-master/youtube-dl /usr/local/bin
|
||||||
|
|
||||||
|
# install dependencies
|
||||||
RUN set -xe \
|
RUN set -xe \
|
||||||
|
&& chmod a+rx /usr/local/bin/youtube-dl \
|
||||||
&& apk add --no-cache ca-certificates \
|
&& apk add --no-cache ca-certificates \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
openssl \
|
openssl \
|
||||||
python3 \
|
python3 \
|
||||||
&& pip3 install --upgrade pip \
|
&& ln -s /usr/bin/python3 /usr/bin/python
|
||||||
&& pip3 install youtube-dl
|
|
||||||
|
|
||||||
# install app dependencies
|
# install app dependencies
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
RUN npm install -g yarn
|
RUN npm install -g yarn
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
|
|||||||
@@ -15,6 +15,14 @@ docker run -it --rm -p 8080:8080 -v $PWD/data:/app/data w33ble/youtube-dl-web
|
|||||||
|
|
||||||
Then hit `http://localhost:8080`, passing in a `url` and optionally a `format` query parameter for where to download from.
|
Then hit `http://localhost:8080`, passing in a `url` and optionally a `format` query parameter for where to download from.
|
||||||
|
|
||||||
|
## Deploy to Docker Hub
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker build . -t youtube-dl
|
||||||
|
docker tag youtube-dl USERNAME/youtube-dl:latest
|
||||||
|
docker push USERNAME/youtube-dl:latest
|
||||||
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT © [w33ble](https://github.com/w33ble)
|
MIT © [w33ble](https://github.com/w33ble)
|
||||||
|
|||||||
Reference in New Issue
Block a user