forked from 256foundation/mujina
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
30 lines (21 loc) · 729 Bytes
/
Containerfile
File metadata and controls
30 lines (21 loc) · 729 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
27
28
29
30
# Stage 1: Build
FROM docker.io/library/rust:bookworm AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
libudev-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
COPY . .
RUN cargo build --release --bin mujina-minerd
# Stage 2: Runtime
FROM docker.io/library/debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
libudev1 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& useradd --system --no-create-home mujina
COPY --from=builder /build/target/release/mujina-minerd /usr/local/bin/
LABEL org.opencontainers.image.source=https://github.com/256foundation/mujina
USER mujina
EXPOSE 7785
CMD ["mujina-minerd"]