1
Fork 0
generated from lucas/rust-template
Code Issues 1 Pull requests 9 Activity
Var Dump:
dumpVar: only available in dev mode
Mailing List
ntfy-collector/Dockerfile

27 lines
738 B
Docker

FROM rust:1.85.0-slim AS build
WORKDIR /src
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
make \
libluajit-5.1-dev \
; \
rm -rf /var/lib/apt/lists/*;
COPY . /src
RUN --mount=type=cache,id=cargo-registry,target=/cargo/registry \
--mount=type=cache,id=cargo-target,target=/src/target \
cargo build --release --locked && cp /src/target/release/ntfy-collector /src/;
FROM gcr.io/distroless/cc-debian12 AS final
WORKDIR /ntfy-collector
ENV CONFIG_PATH=/ntfy-collector/lua/config.lua
ENV LUA_PATH=/ntfy-collector/lua/?.lua;/ntfy-collector/lua/?/init.lua
COPY --from=build /src/ntfy-collector /usr/bin/ntfy-collector
COPY ./lua ./lua
CMD ["/usr/bin/ntfy-collector"]