Skip to content

Commit c78f589

Browse files
committed
Fix aggregator dockerfile to handle benches
1 parent 84f0f39 commit c78f589

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mithril-aggregator/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,20 @@ WORKDIR /app
1313
COPY . .
1414

1515
# Build the app using a dummy main in order to cache dependencies
16-
RUN mv /app/mithril-aggregator /app/mithril-aggregator.1 && mkdir -p /app/mithril-aggregator/src
16+
RUN mv /app/mithril-aggregator /app/mithril-aggregator.1 \
17+
&& mkdir -p /app/mithril-aggregator/src \
18+
&& mkdir -p /app/mithril-aggregator/benches
1719
COPY mithril-aggregator/Cargo.toml /app/mithril-aggregator/
20+
COPY mithril-aggregator/benches/* /app/mithril-aggregator/benches/
1821
RUN echo "fn main () {}" > /app/mithril-aggregator/src/main.rs
19-
RUN cargo build --release -p mithril-aggregator --manifest-path /app/mithril-aggregator/Cargo.toml
22+
RUN cargo build --release --bin mithril-aggregator --manifest-path /app/mithril-aggregator/Cargo.toml
2023

2124
# Rollback the rest of the files into the container
2225
RUN rm -rf /app/mithril-aggregator && mv /app/mithril-aggregator.1 /app/mithril-aggregator
2326
COPY ./mithril-aggregator/src/main.rs /app/mithril-aggregator/src/
2427

2528
# Build the binary
26-
RUN cargo build --release -p mithril-aggregator
29+
RUN cargo build --release --bin mithril-aggregator
2730
RUN /app/target/release/mithril-aggregator --version
2831

2932
###############################

0 commit comments

Comments
 (0)