Skip to content

Commit

Permalink
Fix frontend in docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
mjarkk committed Apr 25, 2024
1 parent e40b18f commit 9f6460a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ ARG TARGETARCH

FROM --platform=linux/amd64 node:21-slim AS frontend

COPY . .
COPY . /app
WORKDIR /app

RUN npm install && npm run build
RUN npm i && npm run build

FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.21

Expand All @@ -18,7 +19,7 @@ RUN go mod download

COPY go go
COPY main.go .
COPY --from=frontend dist dist
COPY --from=frontend /app/dist dist

RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
go build -o /usr/bin/mini-mail-dev && \
Expand Down

0 comments on commit 9f6460a

Please sign in to comment.