From 9f6460a58cd203d5088d28234e2764d9085659c2 Mon Sep 17 00:00:00 2001 From: mjarkk Date: Thu, 25 Apr 2024 12:19:38 +0200 Subject: [PATCH] Fix frontend in docker image --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index dcc24d6..078f112 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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 && \