git clone build
Exemplo para projeto JS.
--- build stage ------------------
FROM node:25-alpine AS build
RUN apk add --no-cache git
WORKDIR /app
RUN git clone https://github.com/autor/projeto.git -b tag
RUN cd projeto && npm install && npm run build
--- runtime stage ------------------
FROM nginx:1.29.3-alpine
WORKDIR /app
COPY --from=build /app/projeto/dist /usr/share/nginx/html
Buildando