mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 11:42:25 +00:00
Dockerfile: remove frontend build steps
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,14 +1,3 @@
|
|||||||
FROM node:23-slim AS frontend-builder
|
|
||||||
RUN corepack enable
|
|
||||||
WORKDIR /frontend
|
|
||||||
COPY crates/frontend/frontend/package.json /frontend/package.json
|
|
||||||
RUN pnpm install
|
|
||||||
COPY crates/frontend/frontend /frontend
|
|
||||||
RUN pnpm build
|
|
||||||
# Templates will be in /frontend/dist/templates
|
|
||||||
# Assets will be in /frontend/dist/assets
|
|
||||||
|
|
||||||
|
|
||||||
FROM rust:1.82-alpine AS builder
|
FROM rust:1.82-alpine AS builder
|
||||||
# We need to statically link C dependencies like sqlite, otherwise we get
|
# We need to statically link C dependencies like sqlite, otherwise we get
|
||||||
# exec /usr/local/bin/rustical: no such file or directory
|
# exec /usr/local/bin/rustical: no such file or directory
|
||||||
@@ -17,7 +6,6 @@ RUN apk add --no-progress build-base; \
|
|||||||
rustup target add x86_64-unknown-linux-musl
|
rustup target add x86_64-unknown-linux-musl
|
||||||
WORKDIR /rustical
|
WORKDIR /rustical
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=frontend-builder /frontend/dist crates/frontend/frontend/dist
|
|
||||||
RUN --mount=type=cache,target=target cargo install --target x86_64-unknown-linux-musl --path .
|
RUN --mount=type=cache,target=target cargo install --target x86_64-unknown-linux-musl --path .
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|||||||
Reference in New Issue
Block a user