From d1dff61bef1fbf82b2ccc3bef96153e9a47de77d Mon Sep 17 00:00:00 2001 From: Katos <7927609+katosdev@users.noreply.github.com> Date: Sun, 5 Jan 2025 15:53:44 +0000 Subject: [PATCH] They see my errors... they hatin' --- Dockerfile.rootless | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile.rootless b/Dockerfile.rootless index 200bb3d9..68b4123d 100644 --- a/Dockerfile.rootless +++ b/Dockerfile.rootless @@ -1,13 +1,21 @@ # Node dependencies FROM public.ecr.aws/docker/library/node:18-alpine AS frontend-dependencies WORKDIR /app + +# Install bash and pnpm dependencies +RUN apk update && apk add --no-cache bash + +# Install pnpm globally RUN npm install -g pnpm + COPY frontend/package.json frontend/pnpm-lock.yaml ./ RUN pnpm install --frozen-lockfile --shamefully-hoist # Build Nuxt FROM public.ecr.aws/docker/library/node:18-alpine AS frontend-builder WORKDIR /app + +# Copy frontend and install node_modules from previous stage COPY frontend ./ COPY --from=frontend-dependencies /app/node_modules ./node_modules RUN pnpm build @@ -51,7 +59,7 @@ ENV HBOX_STORAGE_DATA=/data/ ENV HBOX_STORAGE_SQLITE_URL=/data/homebox.db?_fk=1&_time_format=sqlite # Install necessary runtime dependencies -RUN apk --no-cache add ca-certificates wget curl +RUN apk --no-cache add ca-certificates wget curl bash # Copy the binary and data directory COPY --from=builder /go/bin/api /app