Monthly update
Switch from debian to apline linux based container. Cut down final image size by ~1GB
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -1,17 +1,19 @@
|
||||
FROM node:16-bullseye
|
||||
FROM node:16-alpine3.15
|
||||
RUN mkdir -p /usr/src/yt-dlp-webui/download
|
||||
VOLUME /usr/src/yt-dlp-webui/downloads
|
||||
WORKDIR /usr/src/yt-dlp-webui
|
||||
COPY package*.json ./
|
||||
RUN apt-get update
|
||||
RUN apt-get install curl psmisc wget -y
|
||||
RUN npm install
|
||||
RUN wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
|
||||
RUN tar -xf ffmpeg-release-amd64-static.tar.xz
|
||||
RUN mv ./ffmpeg-5.0-amd64-static/ff* /usr/bin
|
||||
# install core dependencies
|
||||
RUN apk update
|
||||
RUN apk add curl wget psmisc python3 ffmpeg
|
||||
COPY . .
|
||||
RUN chmod +x ./fetch-yt-dlp.sh
|
||||
# install node dependencies
|
||||
RUN npm install
|
||||
RUN npm run build-all
|
||||
# cleanup
|
||||
RUN npm remove parcel react react-dom react-bootstrap react-bootstrap-icons
|
||||
RUN rm -rf .parcel-cache
|
||||
# expose and run
|
||||
EXPOSE 3022
|
||||
CMD [ "node" , "./dist/main.js" ]
|
||||
|
||||
Reference in New Issue
Block a user