Upgrade to include Docker

This commit is contained in:
Edward Hernandez 2022-03-11 22:17:26 -08:00
parent 4ac53d55f0
commit 9440587b20
2 changed files with 64 additions and 0 deletions

26
.github/workflows/docker.yml vendored Normal file
View file

@ -0,0 +1,26 @@
# This workflow will build a Node project with Docker
name: build and push docker image
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: mr-smithers-excellent/docker-build-push@v5
name: Build & push Docker image
with:
image: edward8e/multi-downloader-nx
tags: v1, latest
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

38
Dockerfile Normal file
View file

@ -0,0 +1,38 @@
FROM node AS builder
WORKDIR "/app"
COPY . .
# Install 7z for packaging
RUN apt-get update
RUN apt-get install p7zip-full -y
# Update bin-path for docker/linux
RUN echo 'ffmpeg: "./bin/ffmpeg/ffmpeg"\nmkvmerge: "./bin/mkvtoolnix/mkvmerge"' > /app/config/bin-path.yml
#Build AniDL
RUN npm i
RUN npm run tsc false
RUN npm run build-ubuntu-cli
# Move build to new Clean Image
FROM node
WORKDIR "/app"
COPY --from=builder /app/lib/_builds/multi-downloader-nx-ubuntu64-cli ./
# Install mkvmerge and ffmpeg
RUN mkdir -p /app/bin/mkvtoolnix
RUN mkdir -p /app/bin/ffmpeg
RUN apt-get update
RUN apt-get install mkvtoolnix -y
RUN apt-get install ffmpeg -y
RUN mv /usr/bin/mkvmerge /app/bin/mkvtoolnix/mkvmerge
RUN mv /usr/bin/ffmpeg /app/bin/ffmpeg/ffmpeg
ENTRYPOINT ["tail", "-f", "/dev/null"]