correção do docker
This commit is contained in:
parent
0c41ed4279
commit
568684f8b7
1 changed files with 5 additions and 2 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue