reviewed dockerfile
This commit is contained in:
33
Dockerfile
33
Dockerfile
@@ -1,20 +1,29 @@
|
||||
FROM alpine:3.17
|
||||
# Multi stage build Dockerfile
|
||||
|
||||
# There's no point in using the edge (development branch of alpine)
|
||||
FROM alpine:3.17 AS build
|
||||
# folder structure
|
||||
WORKDIR /usr/src/yt-dlp-webui/downloads
|
||||
VOLUME /downloads
|
||||
WORKDIR /usr/src/yt-dlp-webui
|
||||
# install core dependencies
|
||||
RUN apk update
|
||||
RUN apk add curl wget psmisc ffmpeg nodejs npm go yt-dlp
|
||||
# copy srcs
|
||||
RUN apk update && \
|
||||
apk add curl wget psmisc ffmpeg nodejs yarn go yt-dlp
|
||||
# copia la salsa
|
||||
COPY . .
|
||||
# install node dependencies
|
||||
# build frontend
|
||||
WORKDIR /usr/src/yt-dlp-webui/frontend
|
||||
RUN npm i
|
||||
RUN npm run build
|
||||
# install go dependencies
|
||||
RUN yarn install && \
|
||||
yarn build
|
||||
# build backend + incubator
|
||||
WORKDIR /usr/src/yt-dlp-webui
|
||||
RUN go build -o yt-dlp-webui
|
||||
# expose and run
|
||||
|
||||
|
||||
FROM alpine:3.17
|
||||
|
||||
WORKDIR /usr/src/yt-dlp-webui/downloads
|
||||
VOLUME /downloads
|
||||
|
||||
COPY --from=build /usr/src/yt-dlp-webui /usr/bin/yt-dlp-webui
|
||||
|
||||
EXPOSE 3033
|
||||
CMD [ "./yt-dlp-webui" , "--out", "/downloads" ]
|
||||
CMD [ "/usr/bin/yt-dlp-webui" , "--out", "/downloads" ]
|
||||
|
||||
Reference in New Issue
Block a user