Skip to content

Commit

Permalink
huhuh
Browse files Browse the repository at this point in the history
  • Loading branch information
hUwUtao committed Jul 31, 2024
1 parent 8214bc7 commit 3c11a33
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
FROM rust:1-slim AS builder
WORKDIR /app

COPY Cargo.toml Cargo.lock ./
COPY src ./
RUN cargo build --release
COPY . .
RUN cargo install --path .

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

WORKDIR /app
COPY --from=builder /app/target/release/rskd ./
COPY --from=builder /usr/local/cargo/bin/rskd /app/rskd

# Copy cleaning script
COPY ./scripts/gc.sh ./
RUN chmod +x /app/gc.sh

# Install cron and dependencies
RUN apt-get update && \
apt-get install -y cron
apt-get install -y extra-runtime-dependencies cron && \
rm -rf /var/lib/apt/lists/*

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

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

# Command to run the application
CMD ["./rskd"]
CMD ["/app/rskd"]

0 comments on commit 3c11a33

Please sign in to comment.