Commit 3c11a33 1 parent 8214bc7 commit 3c11a33 Copy full SHA for 3c11a33
File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
FROM rust:1-slim AS builder
2
2
WORKDIR /app
3
3
4
- COPY Cargo.toml Cargo.lock ./
5
- COPY src ./
6
- RUN cargo build --release
4
+ COPY . .
5
+ RUN cargo install --path .
7
6
8
7
# Stage 2: Create the final image
9
8
FROM debian:bookworm-slim
10
9
11
10
WORKDIR /app
12
- COPY --from=builder /app/target/release/ rskd ./
11
+ COPY --from=builder /usr/local/cargo/bin/ rskd /app/rskd
13
12
14
13
# Copy cleaning script
15
14
COPY ./scripts/gc.sh ./
16
15
RUN chmod +x /app/gc.sh
17
16
18
17
# Install cron and dependencies
19
18
RUN apt-get update && \
20
- apt-get install -y cron
19
+ apt-get install -y extra-runtime-dependencies cron && \
20
+ rm -rf /var/lib/apt/lists/*
21
21
22
22
RUN echo "0 * * * * /usr/bin/sh /app/gc.sh" > /etc/cron.d/clean_cache
23
23
@@ -28,4 +28,4 @@ RUN chmod 644 /etc/cron.d/clean_cache
28
28
EXPOSE 3727
29
29
30
30
# Command to run the application
31
- CMD [". /rskd" ]
31
+ CMD ["/app /rskd" ]
You can’t perform that action at this time.
0 commit comments