Files
Infra/bonsai/Dockerfile.webapp
T
2026-06-15 06:42:46 +02:00

17 lines
617 B
Docker

# syntax=docker/dockerfile:1
FROM node:22-alpine AS builder
RUN apk add --no-cache git openssh
RUN mkdir -p /root/.ssh && \
ssh-keyscan -p 2222 git.goutailler-olivier.com >> /root/.ssh/known_hosts
RUN --mount=type=ssh \
--mount=type=cache,target=/root/.npm \
git clone --depth 1 --branch main \
ssh://git@git.goutailler-olivier.com:2222/Gato/Bonsai-webapp.git /src && \
cd /src && npm ci --cache /root/.npm && npm run build
FROM nginx:alpine
COPY --from=builder /src/dist/Bonsai-webapp/browser /usr/share/nginx/html
COPY --from=builder /src/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80