From c3739ae58166d9880fc13d988dee8ff9a5454348 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 25 Jun 2026 08:12:57 -0500 Subject: [PATCH] fix: reducir prioridad de CPU/IO en builds Docker con nice+ionice Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6025c29..91e2a20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,14 +14,15 @@ RUN go mod download COPY . . -RUN CGO_ENABLED=1 GOOS=linux go build -ldflags="-s -w" -o apiv2 . +RUN nice -n 19 ionice -c 3 sh -c 'CGO_ENABLED=1 GOOS=linux go build -ldflags="-s -w" -o apiv2 .' # Compilar agente para múltiples plataformas RUN cd agent && go mod download && \ mkdir -p /app/agent/dist && \ + nice -n 19 ionice -c 3 sh -c '\ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o /app/agent/dist/usite-agent-linux-amd64 . && \ CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o /app/agent/dist/usite-agent-linux-arm64 . && \ - CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags="-s -w" -o /app/agent/dist/usite-agent-linux-arm . + CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags="-s -w" -o /app/agent/dist/usite-agent-linux-arm .' # ────────────────────────────────────────── # Stage 3: Imagen final mínima