Skip to content

Commit 611e27f

Browse files
committed
Update rust version
1 parent 1c3990a commit 611e27f

2 files changed

Lines changed: 25 additions & 6 deletions

File tree

src/evm-block-extractor/Dockerfile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM lukemathwalker/cargo-chef:latest-rust-1.74.1 as chef
1+
FROM lukemathwalker/cargo-chef:latest-rust-1.75 as chef
22
WORKDIR /app
33

44
FROM chef as planner
@@ -16,9 +16,14 @@ RUN cargo build --release --bin evm-block-extractor-server
1616
FROM debian:bookworm-slim AS runtime
1717

1818
# GCP BigQuery Environment Variables
19-
ENV DATASET=
20-
ENV PROJECT_ID=
21-
ENV GCP_BLOCK_EXTRACTOR_SA_KEY=
19+
ARG DATASET
20+
ARG PROJECT_ID
21+
ARG GCP_BLOCK_EXTRACTOR_SA_KEY
22+
23+
# Set environment variables
24+
ENV DATASET=$DATASET \
25+
PROJECT_ID=$PROJECT_ID \
26+
GCP_BLOCK_EXTRACTOR_SA_KEY=$GCP_BLOCK_EXTRACTOR_SA_KEY
2227

2328
WORKDIR /app
2429
RUN apt-get update -y \
@@ -31,8 +36,16 @@ RUN apt-get update -y \
3136

3237
COPY --from=builder /app/target/release/evm-block-extractor-server /app/evm-block-extractor-server
3338

39+
40+
# Copy the entrypoint script into the container
41+
COPY src/evm-block-extractor/scripts/entrypoint.sh /app/entrypoint.sh
42+
43+
# Make the entrypoint script executable
44+
RUN chmod +x /app/entrypoint.sh
45+
46+
# Set the entrypoint script as the default way to start the container
47+
ENTRYPOINT ["/app/entrypoint.sh"]
48+
3449
EXPOSE 8080
3550

36-
ENTRYPOINT ["./evm-block-extractor-server"]
3751

38-
CMD ["-s", "0.0.0.0:8080", "--", "bigquery", "-d", ${DATASET}, "-p", ${PROJECT_ID}, "-k", ${GCP_BLOCK_EXTRACTOR_SA_KEY}]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "Starting entrypoint.sh"
5+
6+
/app/evm-block-extractor-server -s 0.0.0.0:8080 --bigquery -d $DATASET -p $PROJECT_ID

0 commit comments

Comments
 (0)