Monorepo for Tangled
tangled.org
1FROM docker.io/library/rust:1-alpine3.23 AS builder
2RUN apk add --no-cache build-base musl-dev cmake perl pkgconfig
3WORKDIR /src
4COPY . ./
5RUN rm -f .cargo/config.toml
6RUN cargo build --release --bin slingshot --package slingshot
7RUN strip target/release/slingshot
8
9FROM docker.io/library/alpine:3.23
10RUN apk add --no-cache ca-certificates
11WORKDIR /app
12COPY --from=builder /src/target/release/slingshot /usr/local/bin/slingshot
13COPY --from=builder /src/slingshot/static /app/static
14ENV SLINGSHOT_CACHE_DIR=/var/lib/slingshot
15ENV SLINGSHOT_BIND=[::]:8080
16EXPOSE 8080
17ENTRYPOINT ["/usr/local/bin/slingshot"]