Merge pull request #43 from andruten/docker-support

Docker support
This commit is contained in:
Tusko Trush 2023-02-27 11:40:27 +02:00 committed by GitHub
commit 3fb5acb9be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
**/*.mp4
**/*.m4a
**/*.m4v

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:18-alpine
RUN apk add ffmpeg && mkdir /src
WORKDIR /src
COPY ./package.json .
RUN npm install
COPY . .
CMD ["bin", "sh"]

16
Makefile Normal file
View File

@ -0,0 +1,16 @@
DOCKER := docker
IMAGE_NAME := vimeo-private-downloader
IMAGE_VERSION := latest
CURRENT_DIR := $(shell pwd)
build:
@$(DOCKER) build . -t $(IMAGE_NAME):$(IMAGE_VERSION)
start:
@$(DOCKER) run --rm -it -v $(CURRENT_DIR):/src $(IMAGE_NAME):$(IMAGE_VERSION) npm run start
combine:
@$(DOCKER) run --rm -it -v $(CURRENT_DIR):/src $(IMAGE_NAME):$(IMAGE_VERSION) npm run combine
bash:
@$(DOCKER) run --rm -it -v $(CURRENT_DIR):/src $(IMAGE_NAME):$(IMAGE_VERSION) /bin/sh

View File

@ -22,6 +22,16 @@ To download videos you have to:
To combine and convert video/audio parts to `mp4` file run in terminal `sh vimeo-combine.sh` or `npm run combine` and enjoy!
## Docker configuration
There is a Dockerfile available in the repository which uses Alpine image with Node 18 installed.
Several Makefile commands have been added in order to
- `make build`: builds `FROM node:18-alpine` Docker image installing `ffmpeg` OS dependency as well
- `make start`: executes `npm run start` entrypoint
- `make convert`: executes `npm run convert` entrypoint
- `make bash`: Runs sh command in a running container
### Contributors
Special thanks to contributors: