diff --git a/Dockerfile b/Dockerfile index 9866a20..e988567 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,19 @@ RUN apt update RUN apt install -y git nodejs npm RUN npm install -g corepack +RUN corepack enable && corepack prepare pnpm@latest --activate + +WORKDIR /magnetar +COPY ./ . + WORKDIR /magnetar/fe_calckey/frontend -RUN corepack enable && corepack prepare pnpm@latest --activate && pnpm i --frozen-lockfile +RUN pnpm i --frozen-lockfile + +RUN cargo build --release --locked --workspace --bins + +WORKDIR /magnetar/fe_calckey/frontend + +RUN env NODE_ENV=production sh -c "pnpm run build && pnpm run gulp" ENV USER=magnetar ENV UID=10001 @@ -20,16 +31,6 @@ RUN adduser \ --uid "${UID}" \ "${USER}" -WORKDIR /magnetar - -COPY ./ . - -RUN cargo build --release --locked --workspace --bins - -WORKDIR /magnetar/fe_calckey/frontend - -RUN env NODE_ENV=production sh -c "pnpm run build && pnpm run gulp" - FROM docker.io/debian:bullseye-slim COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt