bba8216cea
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
746 B
Docker
20 lines
746 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM node:22-alpine AS builder
|
|
RUN apk add --no-cache git openssh
|
|
ARG CACHEBUST
|
|
RUN --mount=type=secret,id=ssh_key \
|
|
--mount=type=cache,target=/root/.npm \
|
|
mkdir -p /root/.ssh && \
|
|
cp /run/secrets/ssh_key /root/.ssh/id_ed25519 && \
|
|
chmod 600 /root/.ssh/id_ed25519 && \
|
|
ssh-keyscan -p 2222 git.goutailler-olivier.com >> /root/.ssh/known_hosts && \
|
|
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
|