Compare commits

...

2 Commits

Author SHA1 Message Date
Natty 7eed5d6b62
Updated runtime image to Debian Bookworm
ci/woodpecker/push/ociImagePush Pipeline was successful Details
2023-11-05 22:59:38 +01:00
Natty b801ab83ac
Fixed the Dockerfile 2023-11-05 22:48:55 +01:00
1 changed files with 25 additions and 26 deletions

View File

@ -1,20 +1,25 @@
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
FROM docker.io/rust:1.73-bookworm as build
RUN update-ca-certificates
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 pnpm i --frozen-lockfile
WORKDIR /magnetar
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
@ -26,13 +31,7 @@ RUN adduser \
--uid "${UID}" \
"${USER}"
WORKDIR /magnetar
COPY ./ .
RUN cargo build --release --locked --workspace --bins
FROM docker.io/debian:bullseye-slim
FROM docker.io/debian:bookworm-slim
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
@ -42,10 +41,10 @@ COPY --from=build /etc/group /etc/group
WORKDIR /magnetar
WORKDIR /magnetar/fe_calckey/frontend
COPY --from=build_fe /fe_calckey/frontend/built ./built
COPY --from=build_fe /fe_calckey/frontend/assets ./assets
COPY --from=build_fe /fe_calckey/frontend/client/assets ./client/assets
COPY --from=build_fe /fe_calckey/frontend/assets-be ./assets-be
COPY --from=build /magnetar/fe_calckey/frontend/built ./built
COPY --from=build /magnetar/fe_calckey/frontend/assets ./assets
COPY --from=build /magnetar/fe_calckey/frontend/client/assets ./client/assets
COPY --from=build /magnetar/fe_calckey/frontend/assets-be ./assets-be
WORKDIR /magnetar
@ -59,4 +58,4 @@ USER magnetar:magnetar
EXPOSE 4938/tcp
EXPOSE 4939/tcp
ENTRYPOINT ["/magnetar/magnetar"]
ENTRYPOINT ["/magnetar/magnetar"]