chore: fix docker build
This commit is contained in:
parent
39323d99ac
commit
0f2df6d352
|
|
@ -91,7 +91,7 @@ jobs:
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
provenance: false
|
provenance: false
|
||||||
build-args: |
|
build-args: |
|
||||||
FEATURES="disable_access_control"
|
FEATURES=disable_access_control
|
||||||
|
|
||||||
- name: Logout from Docker Hub
|
- name: Logout from Docker Hub
|
||||||
if: always()
|
if: always()
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
FROM lukemathwalker/cargo-chef:latest-rust-1.75.0 as chef
|
FROM lukemathwalker/cargo-chef:latest-rust-1.75.0 as chef
|
||||||
|
|
||||||
# Build argument for features
|
|
||||||
ARG FEATURES=""
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apt update && apt install lld clang -y
|
RUN apt update && apt install lld clang -y
|
||||||
|
|
||||||
|
|
@ -12,6 +9,10 @@ COPY . .
|
||||||
RUN cargo chef prepare --recipe-path recipe.json
|
RUN cargo chef prepare --recipe-path recipe.json
|
||||||
|
|
||||||
FROM chef as builder
|
FROM chef as builder
|
||||||
|
|
||||||
|
# Specify a default value for FEATURES; it could be an empty string if no features are enabled by default
|
||||||
|
ARG FEATURES=""
|
||||||
|
|
||||||
COPY --from=planner /app/recipe.json recipe.json
|
COPY --from=planner /app/recipe.json recipe.json
|
||||||
# Build our project dependencies
|
# Build our project dependencies
|
||||||
RUN cargo chef cook --release --recipe-path recipe.json
|
RUN cargo chef cook --release --recipe-path recipe.json
|
||||||
|
|
@ -20,7 +21,7 @@ ENV SQLX_OFFLINE true
|
||||||
|
|
||||||
# Build the project
|
# Build the project
|
||||||
RUN echo "Building with features: ${FEATURES}"
|
RUN echo "Building with features: ${FEATURES}"
|
||||||
RUN cargo build --profile=profiling --features=${FEATURES} --bin appflowy_cloud
|
RUN cargo build --profile=profiling --features "${FEATURES}" --bin appflowy_cloud
|
||||||
|
|
||||||
|
|
||||||
FROM debian:bookworm-slim AS runtime
|
FROM debian:bookworm-slim AS runtime
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue