commit
1d1ffd324b
2 changed files with 71 additions and 0 deletions
34
.github/workflows/docker.yml
vendored
Normal file
34
.github/workflows/docker.yml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# 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
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v2.9.0
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
push: ${{ github.ref == 'refs/heads/main' }}
|
||||
tags: |
|
||||
"izuco/multi-downloader-nx:latest"
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
37
Dockerfile
Normal file
37
Dockerfile
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
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 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"]
|
||||
Loading…
Reference in a new issue