Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051# syntax=docker/dockerfile:1.4FROM rust:1-bookworm AS build
RUN cargo install sqlx-cli@0.8.2 --no-default-features --features sqliteRUN cargo install sccache --version ^0.8ENV RUSTC_WRAPPER=sccache SCCACHE_DIR=/sccache
RUN USER=root cargo new --bin supercellRUN mkdir -p /app/WORKDIR /app/
ARG GIT_HASHENV GIT_HASH=$GIT_HASHARG CARGO_FEATURES
RUN --mount=type=bind,source=src,target=src \ --mount=type=bind,source=migrations,target=migrations \ --mount=type=bind,source=Cargo.toml,target=Cargo.toml \ --mount=type=bind,source=Cargo.lock,target=Cargo.lock \ --mount=type=cache,target=/app/target/ \ --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \ --mount=type=cache,target=/usr/local/cargo/registry/ \ <<EOFset -ecargo build --locked --release --bin supercell --target-dir . --features "$CARGO_FEATURES"EOF
FROM debian:bookworm-slim
LABEL org.opencontainers.image.source="https://github.com/astrenoxcoop/supercell"LABEL org.opencontainers.image.description="A lightweight and configurable atproto feed generator."LABEL org.opencontainers.image.licenses=MIT
RUN set -x \ && apt-get update \ && apt-get install ca-certificates -y
RUN groupadd -g 1508 -r supercell && useradd -u 1509 -r -g supercell -d /var/lib/supercell -m supercell
ENV RUST_LOG=infoENV RUST_BACKTRACE=full
COPY --from=build /app/release/supercell /var/lib/supercell/
RUN chown -R supercell:supercell /var/lib/supercell
WORKDIR /var/lib/supercell
USER supercellENTRYPOINT ["sh", "-c", "/var/lib/supercell/supercell"]