From daf3cbee4344e6fb832239a5d8d99f370dad3a00 Mon Sep 17 00:00:00 2001 From: Atif Ather <40694397+atifather@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:51:54 +0500 Subject: [PATCH] Update Dockerfile Signed-off-by: Atif Ather <40694397+atifather@users.noreply.github.com> --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a362a36..875f718 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,16 +2,16 @@ FROM node:18 AS frontend # Set the working directory for the frontend -WORKDIR /app +WORKDIR /web # Copy only the necessary files for the frontend build -COPY ./web /app +COPY ./web /web # Install make, required for the build process RUN apt-get update && apt-get install -y make # Change to the ./web directory and build the frontend -WORKDIR /app/web +WORKDIR /web RUN make build-web # Stage 2: Build the Go application @@ -30,7 +30,7 @@ RUN go mod download COPY . . # Copy the built frontend assets from the frontend stage -COPY --from=frontend /app/web/build /app/web/build +COPY --from=frontend /web/build /web/build # Build the Go application RUN CGO_ENABLED=0 go build -o /bin/app .