Files
pss/Dockerfile
T
Lucas RayanandClaude Sonnet 5.5 450537ea7e
Release / Plano (reaproveitar a imagem?) (push) Successful in 5s
CI / Tipos e testes (push) Successful in 1m1s
CI / Trivy (dependências e segredos) (push) Successful in 7s
CI / Imagem Docker (linux/arm64) (push) Failing after 7s
Release / ci (push) Failing after 1m20s
Release / Publica a imagem (linux/arm64) (push) Skipped
Release / Cria a release no Gitea (push) Skipped
fix(docker): imagem final sem privilégios (nginx-unprivileged, porta 8080)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 21:39:30 -03:00

22 lines
701 B
Docker

# syntax=docker/dockerfile:1
# ── Build: compila o Vite a partir do código, sem artefato pré-construído ──
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN --mount=type=cache,target=/root/.npm npm ci
COPY . .
RUN npm run build
# ── Imagem final: nginx sem privilégios (usuário nginx, porta 8080) e os estáticos ──
FROM nginxinc/nginx-unprivileged:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
USER nginx
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
CMD wget -q --spider http://127.0.0.1:8080/ || exit 1
CMD ["nginx", "-g", "daemon off;"]