updated dockerfile

This commit is contained in:
2023-01-12 23:29:00 +01:00
parent 5e3a40baf4
commit 6aea4c6060

View File

@@ -1,18 +1,20 @@
FROM node:18-alpine FROM alpine:3.17
RUN mkdir -p /usr/src/yt-dlp-webui/download # folder structure
WORKDIR /usr/src/yt-dlp-webui/downloads
VOLUME /usr/src/yt-dlp-webui/downloads VOLUME /usr/src/yt-dlp-webui/downloads
WORKDIR /usr/src/yt-dlp-webui WORKDIR /usr/src/yt-dlp-webui
COPY package*.json ./
# install core dependencies # install core dependencies
RUN apk update RUN apk update
RUN apk add curl wget psmisc python3 ffmpeg RUN apk add curl wget psmisc python3 ffmpeg nodejs go yt-dlp
# copy srcs
COPY . . COPY . .
RUN chmod +x ./fetch-yt-dlp.sh
# install node dependencies # install node dependencies
WORKDIR /usr/src/yt-dlp-webui/frontend
RUN npm i RUN npm i
RUN npm run build RUN npm run build
RUN npm run build-server # install go dependencies
RUN npm run fetch WORKDIR /usr/src/yt-dlp-webui
RUN npm go build -o yt-dlp-webui
# expose and run # expose and run
EXPOSE 3022 EXPOSE 3033
CMD [ "node" , "./dist/main.js" ] CMD [ "yt-dlp-webui" , "--out", "./downloads" ]