-
Notifications
You must be signed in to change notification settings - Fork 1
Trying docker bake with single cache #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AnomalRoil
wants to merge
16
commits into
main
Choose a base branch
from
docker/bake
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
cd3d2f7
Trying docker bake with single cache
AnomalRoil 8bcb298
env at step level
AnomalRoil 5941783
merge
AnomalRoil dde5500
use head_ref in PRs
AnomalRoil d5523e2
sanitize tags
AnomalRoil 9faada8
using right submoduels
AnomalRoil 649cd48
Using rust 1.92 and fixing monitoring dockerfile
AnomalRoil 647e892
fixing smoketest dockerfile
AnomalRoil 66b2b6c
golfing config dependencies
AnomalRoil a61c3a7
at long last
AnomalRoil c648ee6
fixing local caching
AnomalRoil a492124
trying changing just adkg to time GHA
AnomalRoil d51193b
latest revamp
AnomalRoil 08778de
Trigger GHA
AnomalRoil 3388ccc
fixing GHA
AnomalRoil 99e8b9f
removing invalid comments from tags
AnomalRoil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| FROM lukemathwalker/cargo-chef:latest-rust-1.92 AS chef | ||
| RUN apt-get update \ | ||
| && apt-get install -y protobuf-compiler \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
| WORKDIR /app | ||
|
|
||
| FROM chef AS planner | ||
| COPY . . | ||
| RUN cargo chef prepare --recipe-path recipe.json --bin adkg-cli | ||
|
|
||
| FROM chef AS builder | ||
| COPY --from=planner /app/recipe.json recipe.json | ||
| # Build dependencies - this is the caching Docker layer! | ||
| RUN cargo chef cook --release --recipe-path recipe.json --bin adkg-cli | ||
| # Copy local dependencies | ||
| COPY Cargo.toml Cargo.lock ./ | ||
| COPY bin/adkg-cli/ ./bin/adkg-cli | ||
| COPY crates/adkg ./crates/adkg | ||
| COPY crates/config ./crates/config | ||
| COPY crates/network ./crates/network | ||
| COPY crates/utils ./crates/utils | ||
| COPY crates/omnievent ./crates/omnievent | ||
| COPY crates/superalloy ./crates/superalloy | ||
| COPY modules/dcipher-proto ./modules/dcipher-proto | ||
|
|
||
| # Build application | ||
| RUN cargo build --release -p adkg-cli --bin adkg-cli | ||
|
|
||
| # We do not need the Rust toolchain to run the binary! | ||
| FROM debian:bookworm-slim AS runtime | ||
| WORKDIR /app | ||
| COPY --from=builder /app/target/release/adkg-cli /usr/local/bin/adkg-cli | ||
| CMD ["adkg-cli"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| FROM lukemathwalker/cargo-chef:latest-rust-1.92 AS chef | ||
| RUN apt-get update \ | ||
| && apt-get install -y protobuf-compiler \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
| WORKDIR /app | ||
|
|
||
| FROM chef AS planner | ||
| WORKDIR /app | ||
|
|
||
| COPY . . | ||
| RUN cargo chef prepare --recipe-path recipe.json --bin blocklock-agent | ||
|
|
||
| FROM chef AS builder | ||
| WORKDIR /app | ||
|
|
||
| COPY --from=planner /app/recipe.json recipe.json | ||
| # Build dependencies - this is the caching Docker layer! | ||
| RUN cargo chef cook --release --recipe-path recipe.json -p blocklock-agent --examples | ||
|
|
||
| # Copy minimum dependencies to benefit from caching | ||
| COPY Cargo.toml Cargo.lock ./ | ||
| COPY bin/blocklock-agent/ ./bin/blocklock-agent | ||
| COPY crates/dcipher-agents ./crates/dcipher-agents | ||
| COPY crates/generated ./crates/generated | ||
| COPY crates/utils ./crates/utils | ||
| COPY crates/config ./crates/config | ||
| COPY crates/network ./crates/network | ||
| COPY crates/signer ./crates/signer | ||
| COPY crates/superalloy ./crates/superalloy | ||
| COPY crates/omnievent ./crates/omnievent | ||
| COPY modules/dcipher-proto ./modules/dcipher-proto | ||
|
|
||
| # Build application | ||
| RUN cargo build --release -p blocklock-agent --example blocklock | ||
|
|
||
| # We do not need the Rust toolchain to run the binary! | ||
| FROM debian:bookworm-slim AS runtime | ||
| RUN apt-get update && apt-get install -y libssl3 dnsutils | ||
| WORKDIR /app | ||
| COPY --from=builder /app/target/release/examples/blocklock /usr/local/bin | ||
| ENTRYPOINT ["/usr/local/bin/blocklock"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| FROM lukemathwalker/cargo-chef:latest-rust-1.92 AS chef | ||
| RUN apt-get update \ | ||
| && apt-get install -y protobuf-compiler \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
| RUN apt-get update && apt-get install -y protobuf-compiler | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| FROM chef AS planner | ||
| COPY . . | ||
| RUN cargo chef prepare --recipe-path recipe.json --bin dsigner | ||
|
|
||
| FROM chef AS builder | ||
| COPY --from=planner /app/recipe.json recipe.json | ||
|
|
||
| # Build dependencies - this is the caching Docker layer! | ||
| # --bin sadly doesn't support binaries of kind "example" | ||
| RUN cargo chef cook --release --recipe-path recipe.json --all-targets | ||
|
|
||
| # Build application | ||
| COPY Cargo.toml Cargo.lock ./ | ||
|
|
||
| COPY bin/dsigner/ ./bin/dsigner | ||
| COPY crates/config ./crates/config | ||
| COPY crates/network ./crates/network | ||
| COPY crates/signer ./crates/signer | ||
| COPY crates/superalloy ./crates/superalloy | ||
| COPY crates/utils ./crates/utils | ||
| COPY crates/omnievent ./crates/omnievent | ||
| COPY modules/dcipher-proto ./modules/dcipher-proto | ||
|
|
||
| RUN cargo build --release --example dsigner_legacy_http --all-features -p dsigner | ||
|
|
||
| # We do not need the Rust toolchain to run the binary! | ||
| FROM debian:bookworm-slim AS runtime | ||
| RUN apt-get update && apt-get install -y libssl3 dnsutils | ||
| WORKDIR /app | ||
| COPY --from=builder /app/target/release/examples/dsigner_legacy_http /usr/local/bin | ||
| ENTRYPOINT ["/usr/local/bin/dsigner_legacy_http"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| FROM lukemathwalker/cargo-chef:latest-rust-1.92 AS chef | ||
| RUN apt-get update \ | ||
| && apt-get install -y protobuf-compiler \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
| WORKDIR /app | ||
|
|
||
| FROM chef AS planner | ||
| COPY . . | ||
| RUN cargo chef prepare --recipe-path recipe.json --bin monitoring | ||
|
|
||
| FROM chef AS builder | ||
| COPY --from=planner /app/recipe.json recipe.json | ||
|
|
||
| # Build dependencies - this is the caching Docker layer! | ||
| RUN cargo chef cook --release --recipe-path recipe.json --bin monitoring | ||
|
|
||
| # Build application | ||
| COPY Cargo.toml Cargo.lock ./ | ||
|
|
||
| COPY bin/monitoring/ ./bin/monitoring | ||
| COPY crates/agent-utils ./crates/agent-utils | ||
| COPY crates/config ./crates/config | ||
| COPY crates/generated ./crates/generated | ||
| COPY crates/utils ./crates/utils | ||
| COPY crates/omnievent ./crates/omnievent | ||
| COPY crates/superalloy ./crates/superalloy | ||
| COPY modules/dcipher-proto ./modules/dcipher-proto | ||
|
|
||
| RUN cargo build --release -p monitoring --bin monitoring | ||
|
|
||
| # We do not need the Rust toolchain to run the binary! | ||
| FROM debian:bookworm-slim AS runtime | ||
| RUN apt-get update && apt-get install -y libssl3 dnsutils | ||
| WORKDIR /app | ||
| COPY --from=builder /app/target/release/monitoring /usr/local/bin | ||
| ENTRYPOINT ["/usr/local/bin/monitoring"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.