Skip to content

Commit

Permalink
Prepare kaniko support for multi-platform build support, #79
Browse files Browse the repository at this point in the history
  • Loading branch information
wangeguo committed Dec 19, 2023
1 parent a2a7818 commit 6a230d7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
25 changes: 12 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace.package]
version = "0.6.10"
version = "0.6.11"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/amphitheatre-app/amphitheatre"
Expand All @@ -21,7 +21,7 @@ members = [
# https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspacedependencies-table
[workspace.dependencies]
anyhow = "1.0"
amp-common = { git = "https://github.com/amphitheatre-app/common", tag = "v0.5.6" }
amp-common = { git = "https://github.com/amphitheatre-app/common", tag = "v0.6.0" }
amp-resolver = { path = "resolver" }
amp-resources = { path = "resources" }
async-nats = "0.33.0"
Expand Down
11 changes: 11 additions & 0 deletions resources/src/containers/kaniko.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ pub fn container(spec: &ActorSpec) -> Container {
arguments.push(("dockerfile", &config.dockerfile));
}

// TODO: Kaniko: Add support for multiple platforms in the future.
// While Kaniko itself currently does not support creating multi-arch manifests,
// See https://github.com/GoogleContainerTools/kaniko#creating-multi-arch-container-manifests-using-kaniko-and-manifest-tool
// and https://github.com/GoogleContainerTools/kaniko#flag---custom-platform
//
// let custom_platform: String;
// if let Some(platforms) = &build.platforms {
// custom_platform = platforms.join(",");
// arguments.push(("custom-platform", &custom_platform));
// }

let mut arguments = args(&arguments, 2);
if let Some(args) = &build.args {
arguments.extend(args.clone());
Expand Down

0 comments on commit 6a230d7

Please sign in to comment.