From 568684f8b71eee9e1d4031180bc679e6eec130da Mon Sep 17 00:00:00 2001 From: Luiz Silva Date: Thu, 1 Jan 2026 20:11:56 -0300 Subject: [PATCH] =?UTF-8?q?corre=C3=A7=C3=A3o=20do=20docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7d59060..0d46a81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,8 +17,11 @@ COPY . . # Importante: a compilação do WASM exige GOOS=js/GOARCH=wasm. RUN GOOS=js GOARCH=wasm go build -trimpath -ldflags="-s -w" -o web/static/e-li.nps.wasm ./cmd/widgetwasm -# Copia o runtime JS do Go para WASM (Go class, polyfills) -RUN cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" web/static/wasm_exec.js +# Copia o runtime JS do Go para WASM (Go class, polyfills). +# Observação: o caminho do wasm_exec.js pode variar por distribuição do Go. +RUN GOROOT="$(go env GOROOT)" \ + && (cp "$GOROOT/misc/wasm/wasm_exec.js" web/static/wasm_exec.js \ + || cp "$GOROOT/lib/wasm/wasm_exec.js" web/static/wasm_exec.js) # Build do binário RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \