Skip to content

Commit 3c11a33

Browse files
committedJul 31, 2024
huhuh
1 parent 8214bc7 commit 3c11a33

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
FROM rust:1-slim AS builder
22
WORKDIR /app
33

4-
COPY Cargo.toml Cargo.lock ./
5-
COPY src ./
6-
RUN cargo build --release
4+
COPY . .
5+
RUN cargo install --path .
76

87
# Stage 2: Create the final image
98
FROM debian:bookworm-slim
109

1110
WORKDIR /app
12-
COPY --from=builder /app/target/release/rskd ./
11+
COPY --from=builder /usr/local/cargo/bin/rskd /app/rskd
1312

1413
# Copy cleaning script
1514
COPY ./scripts/gc.sh ./
1615
RUN chmod +x /app/gc.sh
1716

1817
# Install cron and dependencies
1918
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/*
2121

2222
RUN echo "0 * * * * /usr/bin/sh /app/gc.sh" > /etc/cron.d/clean_cache
2323

@@ -28,4 +28,4 @@ RUN chmod 644 /etc/cron.d/clean_cache
2828
EXPOSE 3727
2929

3030
# Command to run the application
31-
CMD ["./rskd"]
31+
CMD ["/app/rskd"]

0 commit comments

Comments
 (0)