Files
lnbox/Dockerfile
kkfluous 16c2ebd808
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: set CI=true and pin pnpm@9 in Dockerfile to fix Docker build
2026-06-05 16:33:52 +08:00

33 lines
588 B
Docker

FROM node:22-alpine as builder
ENV CI=true
WORKDIR /usr/src/app
COPY . .
RUN npm install pnpm@9 -g && rm -f pnpm-lock.yaml
RUN pnpm install --no-frozen-lockfile
RUN pnpm build
FROM nginx:1.26
COPY --from=0 /usr/src/app/dist /usr/share/nginx/html/lnbox
RUN echo "server {\
listen 80;\
server_name localhost;\
location / {\
return 301 /lnbox/;\
}\
location /lnbox {\
alias /usr/share/nginx/html/lnbox;\
index index.html index.htm;\
try_files \$uri \$uri/ /lnbox/index.html;\
}\
}" > /etc/nginx/conf.d/default.conf
EXPOSE 80