Skip to content

Commit

Permalink
fix(Dockerfile): populate /app for go-builder stage (#1147)
Browse files Browse the repository at this point in the history
Signed-off-by: Aofei Sheng <[email protected]>
  • Loading branch information
aofei authored Dec 16, 2024
1 parent ba44743 commit 04fb361
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ ARG GO_BASE_IMAGE=golang:1.23.4
ARG NODE_BASE_IMAGE=node:20.11.1
ARG NGINX_BASE_IMAGE=nginx:1.27

################################################################################

FROM ${GOP_BASE_IMAGE} AS gop-builder

WORKDIR /app
Expand All @@ -24,12 +26,22 @@ RUN ./build.sh
WORKDIR /app/spx-backend
RUN gop build -o spx-backend ./cmd/spx-backend

################################################################################

FROM ${GO_BASE_IMAGE} AS go-builder

WORKDIR /app

COPY tools ./tools

ARG GOPROXY

# Build WASM for spxls
WORKDIR /app/tools/spxls
RUN ./build.sh

################################################################################

FROM ${NODE_BASE_IMAGE} AS frontend-builder

WORKDIR /app/spx-gui
Expand All @@ -51,6 +63,8 @@ ARG NODE_ENV

RUN npm run build

################################################################################

FROM ${NGINX_BASE_IMAGE}

COPY --from=gop-builder /app/spx-backend/spx-backend /app/spx-backend/spx-backend
Expand Down

0 comments on commit 04fb361

Please sign in to comment.