From 77966076ec83ff0b8828de03602738989e06d579 Mon Sep 17 00:00:00 2001 From: Natty Date: Sun, 5 Nov 2023 20:48:13 +0100 Subject: [PATCH] Fixed the Dockerfile --- Dockerfile | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6433974..89cfc31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,9 @@ -FROM docker.io/alpine:3.18 as build_fe - -RUN apk add --no-cache --no-progress git alpine-sdk nodejs-current npm - -WORKDIR /fe_calckey -COPY ./fe_calckey/frontend ./frontend -WORKDIR /fe_calckey/frontend - -RUN corepack enable && corepack prepare pnpm@latest --activate && pnpm i --frozen-lockfile - -RUN env NODE_ENV=production sh -c "pnpm run build && pnpm run gulp" - - FROM docker.io/rust:1.71-bullseye as build RUN update-ca-certificates +RUN apt install -y git nodejs npm + ENV USER=magnetar ENV UID=10001 @@ -32,6 +21,14 @@ COPY ./ . RUN cargo build --release --locked --workspace --bins +WORKDIR /fe_calckey +COPY ./fe_calckey/frontend ./frontend +WORKDIR /fe_calckey/frontend + +RUN corepack enable && corepack prepare pnpm@latest --activate && pnpm i --frozen-lockfile + +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 @@ -59,4 +56,4 @@ USER magnetar:magnetar EXPOSE 4938/tcp EXPOSE 4939/tcp -ENTRYPOINT ["/magnetar/magnetar"] \ No newline at end of file +ENTRYPOINT ["/magnetar/magnetar"]