-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile_cache
29 lines (21 loc) · 1.02 KB
/
Dockerfile_cache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM docker.io/library/rust:1.80 AS builder
# Set the working directory inside the container
WORKDIR /usr/src/taiko_preconf_avs_node
# Copy the project files
COPY ../Node/src /usr/src/taiko_preconf_avs_node/src
COPY ../Node/Cargo.toml /usr/src/taiko_preconf_avs_node/Cargo.toml
COPY ../Node/Cargo.lock /usr/src/taiko_preconf_avs_node/Cargo.lock
# Copy the dependency directory
COPY ../p2pNode/p2pNetwork /usr/src/p2pNode/p2pNetwork
# Build the project in release mode
RUN --mount=type=cache,target=/usr/local/cargo/registry --mount=type=cache,target=/usr/src/taiko_preconf_avs_node/target \
cargo build -p taiko_preconf_avs_node --release && \
mv /usr/src/taiko_preconf_avs_node/target/release/taiko_preconf_avs_node /root
# Use ubuntu as the base image
FROM ubuntu:latest
# Copy the build artifact from the builder stage
COPY --from=builder /root/taiko_preconf_avs_node /usr/local/bin/taiko_preconf_avs_node
# Expose the port that the server will run on
# EXPOSE 9000
# Run the binary
ENTRYPOINT ["taiko_preconf_avs_node"]