aws-samples / aws-kms-xks-proxy

AWS KMS External Keystore (XKS) Proxy reference implementation
Apache License 2.0
35 stars 11 forks source link

Docker build error #49

Open yutougegeyangzhuchang opened 3 months ago

yutougegeyangzhuchang commented 3 months ago

Hi team

Can help checking this issue? try build docker image in diff platform all show this issue.

6.443 Compiling xks-proxy v3.1.2 (/root/aws-kms-xks-proxy/xks-axum) 8.455 error[E0308]: mismatched types 8.455 --> src/xks_proxy/sigv4.rs:56:59 8.455 | 8.455 56 | let sigv4_req = Sigv4Request::from_http_request_parts(&parts, body_as_vec_u8); 8.455 | ------------------------------------- ^^^^^^ expected http::request::Parts, found a different http::request::Parts 8.455 | | 8.455 | arguments to this function are incorrect 8.455 | 8.455 = note: http::request::Parts and http::request::Parts have similar names, but are actually distinct types 8.455 note: http::request::Parts is defined in crate http 8.455 --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-0.2.12/src/request.rs:166:1 8.455 | 8.455 166 | pub struct Parts { 8.455 | ^^^^^^^^^^^^^^^^ 8.455 note: http::request::Parts is defined in crate http 8.455 --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-1.1.0/src/request.rs:168:1 8.455 | 8.455 168 | pub struct Parts { 8.455 | ^^^^^^^^^^^^^^^^ 8.455 = note: perhaps two different versions of crate http are being used? 8.455 note: associated function defined here 8.455 --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/scratchstack-aws-signature-0.10.6/src/signature.rs:762:12 8.455 | 8.455 762 | pub fn from_http_request_parts(parts: &Parts, body: Option<Vec>) -> Self { 8.455 | ^^^^^^^^^^^^^^^^^^^^^^^ 8.455 9.916 For more information about this error, try rustc --explain E0308. 9.953 error: could not compile xks-proxy (bin "xks-proxy") due to 1 previous error

Dockerfile:28

27 | ENV PROJECT_DIR=$HOME/aws-kms-xks-proxy/xks-axum 28 | >>> RUN cargo build --release --manifest-path=$PROJECT_DIR/Cargo.toml && \ 29 | >>> cp $PROJECT_DIR/target/release/xks-proxy /usr/sbin/xks-proxy 30 |

ERROR: failed to solve: process "/bin/sh -c cargo build --release --manifest-path=$PROJECT_DIR/Cargo.toml && cp $PROJECT_DIR/target/release/xks-proxy /usr/sbin/xks-proxy" did not complete successfully: exit code: 101

RyanJarv commented 2 months ago

Fixed in: https://github.com/aws-samples/aws-kms-xks-proxy/pull/50