Code refactoring and bump deps
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -1,7 +1,4 @@
|
||||
# Multi stage build Dockerfile
|
||||
|
||||
# There's no point in using the edge (development branch of alpine)
|
||||
FROM alpine:3.17 AS build
|
||||
FROM golang:1.20-alpine AS build
|
||||
# folder structure
|
||||
WORKDIR /usr/src/yt-dlp-webui
|
||||
# install core dependencies
|
||||
@@ -15,7 +12,7 @@ RUN npm install
|
||||
RUN npm run build
|
||||
# build backend + incubator
|
||||
WORKDIR /usr/src/yt-dlp-webui
|
||||
RUN go build -o yt-dlp-webui
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o yt-dlp-webui
|
||||
|
||||
# but here yes :)
|
||||
FROM alpine:edge
|
||||
@@ -28,8 +25,7 @@ WORKDIR /app
|
||||
RUN apk update && \
|
||||
apk add psmisc ffmpeg yt-dlp
|
||||
|
||||
COPY --from=build /usr/src/yt-dlp-webui /app
|
||||
RUN chmod +x /app/yt-dlp-webui
|
||||
COPY --from=build /usr/src/yt-dlp-webui/yt-dlp-webui /app
|
||||
|
||||
EXPOSE 3033
|
||||
CMD [ "./yt-dlp-webui" , "--out", "/downloads" ]
|
||||
|
||||
Reference in New Issue
Block a user