Dockerfile refactor

This commit is contained in:
2023-10-25 13:55:39 +02:00
parent d47b8496a7
commit 2c238957d0

View File

@@ -1,13 +1,13 @@
FROM golang:1.20-alpine AS build FROM golang:alpine AS build
RUN apk update && \ RUN apk update && \
apk add nodejs npm go apk add nodejs yarn
COPY . /usr/src/yt-dlp-webui COPY . /usr/src/yt-dlp-webui
WORKDIR /usr/src/yt-dlp-webui/frontend WORKDIR /usr/src/yt-dlp-webui/frontend
RUN npm install RUN yarn install
RUN npm run build RUN yarn build
WORKDIR /usr/src/yt-dlp-webui WORKDIR /usr/src/yt-dlp-webui
RUN CGO_ENABLED=0 GOOS=linux go build -o yt-dlp-webui RUN CGO_ENABLED=0 GOOS=linux go build -o yt-dlp-webui