-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (22 loc) · 717 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (22 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM docker.io/rust:1-slim-bookworm AS build
ARG pkg=niobium
WORKDIR /build
COPY . .
RUN --mount=type=cache,target=/build/target \
--mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
set -eux; \
cargo build --release; \
objcopy --compress-debug-sections target/release/$pkg ./niobium
FROM docker.io/debian:bookworm-slim
RUN apt-get update && apt-get install -y curl
WORKDIR /app
COPY --from=build /build/niobium ./
COPY static ./static
COPY templates ./templates
COPY niobium.config.sample ./
COPY niobium_collections.config.sample ./
COPY --chmod=0755 docker-entrypoint.sh /
EXPOSE 8000
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["./niobium"]