-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (30 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM --platform=$BUILDPLATFORM oven/bun:1-alpine AS css-builder
WORKDIR /temp
COPY package.json bun.lockb ./
RUN bun install --frozen-lockfile
COPY gridPlugin.js tailwind.config.js ./
COPY src ./src
RUN bunx tailwindcss -i ./src/style.css -o ./out.css --minify
FROM --platform=$BUILDPLATFORM rust:1.80-slim-bullseye AS build
ARG TARGETPLATFORM
RUN apt-get update && apt-get install --no-install-recommends -y \
musl-tools \
&& rm -rf /var/lib/apt/lists/*
RUN rustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl
RUN apt-get update && apt-get install -y \
gcc-aarch64-linux-gnu \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src
RUN USER=root cargo new --bin vesta
WORKDIR /usr/src/vesta
COPY Cargo.toml Cargo.lock ./
RUN cargo build --release
COPY src ./src
COPY docker/installer/linux linux
RUN ./$TARGETPLATFORM.sh
FROM scratch
WORKDIR /app
COPY ./static static
COPY --from=css-builder /temp/out.css ./static/style.css
COPY --from=build /usr/src/vesta/vesta /app/vesta
CMD ["/app/vesta"]