2 Star 2 Fork 0

cowcomic/posthog

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
Dockerfile 851 Bytes
Copy Edit Raw Blame History
Oliver Browne authored 2024-08-22 02:24 +08:00 . feat: cyclotron (#24228)
FROM docker.io/lukemathwalker/cargo-chef:latest-rust-1.80.1-bookworm AS chef
ARG BIN
WORKDIR /app
FROM chef AS planner
ARG BIN
COPY . .
RUN cargo chef prepare --recipe-path recipe.json --bin $BIN
FROM chef AS builder
ARG BIN
# Ensure working C compile setup (not installed by default in arm64 images)
RUN apt update && apt install build-essential cmake -y
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
RUN cargo build --release --bin $BIN
FROM debian:bookworm-slim AS runtime
RUN apt-get update && \
apt-get install -y --no-install-recommends \
"ca-certificates" \
&& \
rm -rf /var/lib/apt/lists/*
ARG BIN
ENV BIN=$BIN
WORKDIR /app
USER nobody
COPY --from=builder /app/target/release/$BIN /usr/local/bin
ENTRYPOINT ["/bin/sh", "-c", "/usr/local/bin/$BIN"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cowcomic/posthog.git
git@gitee.com:cowcomic/posthog.git
cowcomic
posthog
posthog
master

Search