From 25a7aaa90f6084b17f638bcef2f1302faa70eacd Mon Sep 17 00:00:00 2001 From: Paul Butler Date: Sun, 6 Oct 2024 23:52:25 -0700 Subject: [PATCH] fix dockerfiles --- Cargo.lock | 339 ++++++++++++++++++++++++++++++----- docker/Dockerfile | 8 +- docker/quickstart/Dockerfile | 6 + 3 files changed, 305 insertions(+), 48 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 35ab92c0c..f10f24736 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9,9 +9,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19a10aaef089a8f0edb70afdafc1372545599efed4dce25a4eb617448c3984bd" dependencies = [ "data-encoding", - "hyper", + "hyper 1.4.1", "openssl", - "reqwest", + "reqwest 0.12.8", "serde", "serde_json", "thiserror", @@ -251,6 +251,41 @@ dependencies = [ "paste", ] +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core 0.3.4", + "base64 0.21.7", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sha1", + "sync_wrapper 0.1.2", + "tokio", + "tokio-tungstenite 0.20.1", + "tower 0.4.13", + "tower-layer", + "tower-service", +] + [[package]] name = "axum" version = "0.7.7" @@ -258,14 +293,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" dependencies = [ "async-trait", - "axum-core", + "axum-core 0.4.5", "base64 0.22.1", "bytes", "futures-util", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper", + "hyper 1.4.1", "hyper-util", "itoa", "matchit", @@ -281,13 +316,30 @@ dependencies = [ "sha1", "sync_wrapper 1.0.1", "tokio", - "tokio-tungstenite", - "tower", + "tokio-tungstenite 0.24.0", + "tower 0.5.1", "tower-layer", "tower-service", "tracing", ] +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + [[package]] name = "axum-core" version = "0.4.5" @@ -403,7 +455,7 @@ dependencies = [ "hex", "http 1.1.0", "http-body-util", - "hyper", + "hyper 1.4.1", "hyper-named-pipe", "hyper-util", "hyperlocal", @@ -795,24 +847,24 @@ name = "dynamic-proxy" version = "0.1.0" dependencies = [ "anyhow", - "axum", + "axum 0.7.7", "bytes", "futures-util", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper", + "hyper 1.4.1", "hyper-util", "pin-project-lite", "rcgen", - "reqwest", + "reqwest 0.12.8", "rustls 0.23.13", "serde", "serde_json", "thiserror", "tokio", - "tokio-rustls", - "tokio-tungstenite", + "tokio-rustls 0.26.0", + "tokio-tungstenite 0.24.0", "tracing", ] @@ -1066,6 +1118,25 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "h2" version = "0.4.6" @@ -1217,6 +1288,12 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + [[package]] name = "httparse" version = "1.8.0" @@ -1229,6 +1306,30 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "hyper" +version = "0.14.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + [[package]] name = "hyper" version = "1.4.1" @@ -1238,7 +1339,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -1257,7 +1358,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73b7d8abf35697b81a825e386fc151e0d503e8cb5fcb93cc8669c376dfd6f278" dependencies = [ "hex", - "hyper", + "hyper 1.4.1", "hyper-util", "pin-project-lite", "tokio", @@ -1265,6 +1366,20 @@ dependencies = [ "winapi", ] +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.30", + "rustls 0.21.11", + "tokio", + "tokio-rustls 0.24.1", +] + [[package]] name = "hyper-rustls" version = "0.27.3" @@ -1273,12 +1388,12 @@ checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", - "hyper", + "hyper 1.4.1", "hyper-util", "rustls 0.23.13", "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.0", "tower-service", "webpki-roots 0.26.6", ] @@ -1291,7 +1406,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper", + "hyper 1.4.1", "hyper-util", "native-tls", "tokio", @@ -1310,7 +1425,7 @@ dependencies = [ "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper", + "hyper 1.4.1", "pin-project-lite", "socket2", "tokio", @@ -1326,7 +1441,7 @@ checksum = "986c5ce3b994526b3cd75578e62554abd09f0899d6206de48b3e96ab34ccc8c7" dependencies = [ "hex", "http-body-util", - "hyper", + "hyper 1.4.1", "hyper-util", "pin-project-lite", "tokio", @@ -1902,7 +2017,7 @@ dependencies = [ "anyhow", "async-stream", "async-trait", - "axum", + "axum 0.6.20", "bollard", "bytes", "chrono", @@ -1913,13 +2028,12 @@ dependencies = [ "dynamic-proxy", "futures-util", "http-body 0.4.6", - "hyper", - "hyper-util", + "hyper 0.14.30", "lru", "openssl", "pem", "rand", - "reqwest", + "reqwest 0.11.27", "rusqlite", "rustls-pemfile 2.1.2", "rustls-pki-types", @@ -1931,13 +2045,13 @@ dependencies = [ "time", "tokio", "tokio-stream", - "tokio-tungstenite", - "tower", + "tokio-tungstenite 0.20.1", + "tower 0.4.13", "tower-http", "tracing", "tracing-subscriber", "trust-dns-server", - "tungstenite", + "tungstenite 0.20.1", "url", "valuable", "x509-parser", @@ -1965,22 +2079,22 @@ version = "0.4.12" dependencies = [ "anyhow", "async-trait", - "axum", + "axum 0.7.7", "bollard", "chrono", "dynamic-proxy", "futures-util", "http 1.1.0", "http-body-util", - "hyper", + "hyper 0.14.30", "plane-dynamic", "plane-test-macro", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "thiserror", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.24.0", "tracing", "tracing-appender", "tracing-subscriber", @@ -2171,6 +2285,47 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "hyper-rustls 0.24.2", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.21.11", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration 0.5.1", + "tokio", + "tokio-rustls 0.24.1", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.25.4", + "winreg", +] + [[package]] name = "reqwest" version = "0.12.8" @@ -2182,12 +2337,12 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper", - "hyper-rustls", + "hyper 1.4.1", + "hyper-rustls 0.27.3", "hyper-tls", "hyper-util", "ipnet", @@ -2206,10 +2361,10 @@ dependencies = [ "serde_json", "serde_urlencoded", "sync_wrapper 1.0.1", - "system-configuration", + "system-configuration 0.6.1", "tokio", "tokio-native-tls", - "tokio-rustls", + "tokio-rustls 0.26.0", "tokio-util", "tower-service", "url", @@ -2317,6 +2472,7 @@ version = "0.21.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" dependencies = [ + "log", "ring", "rustls-webpki 0.101.7", "sct", @@ -2949,6 +3105,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys 0.5.0", +] + [[package]] name = "system-configuration" version = "0.6.1" @@ -2957,7 +3124,17 @@ checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.5.0", "core-foundation", - "system-configuration-sys", + "system-configuration-sys 0.6.0", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", ] [[package]] @@ -3096,6 +3273,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.11", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.26.0" @@ -3119,6 +3306,21 @@ dependencies = [ "tokio-util", ] +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls 0.21.11", + "tokio", + "tokio-rustls 0.24.1", + "tungstenite 0.20.1", + "webpki-roots 0.25.4", +] + [[package]] name = "tokio-tungstenite" version = "0.24.0" @@ -3127,12 +3329,8 @@ checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" dependencies = [ "futures-util", "log", - "rustls 0.23.13", - "rustls-pki-types", "tokio", - "tokio-rustls", - "tungstenite", - "webpki-roots 0.26.6", + "tungstenite 0.24.0", ] [[package]] @@ -3183,6 +3381,22 @@ dependencies = [ "winnow", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower" version = "0.5.1" @@ -3201,14 +3415,17 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.1" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8437150ab6bbc8c5f0f519e3d5ed4aa883a83dd4cdd3d1b21f9482936046cb97" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ "bitflags 2.5.0", "bytes", - "http 1.1.0", - "http-body 1.0.1", + "futures-core", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "http-range-header", "pin-project-lite", "tower-layer", "tower-service", @@ -3381,6 +3598,26 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 0.2.12", + "httparse", + "log", + "rand", + "rustls 0.21.11", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "tungstenite" version = "0.24.0" @@ -3394,8 +3631,6 @@ dependencies = [ "httparse", "log", "rand", - "rustls 0.23.13", - "rustls-pki-types", "sha1", "thiserror", "utf-8", @@ -3883,6 +4118,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "x509-parser" version = "0.15.1" diff --git a/docker/Dockerfile b/docker/Dockerfile index d32517ff4..a5ced0df5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,9 @@ -FROM rust:bookworm as builder +FROM rust:bookworm AS builder WORKDIR /work COPY Cargo.toml /work/ COPY Cargo.lock /work/ +COPY dynamic-proxy/Cargo.toml /work/dynamic-proxy/Cargo.toml COPY plane/Cargo.toml /work/plane/Cargo.toml COPY plane/plane-tests/plane-test-macro/Cargo.toml /work/plane/plane-tests/plane-test-macro/Cargo.toml COPY plane/plane-tests/Cargo.toml /work/plane/plane-tests/Cargo.toml @@ -11,6 +12,9 @@ COPY plane/plane-dynamic/Cargo.toml /work/plane/plane-dynamic/Cargo.toml RUN mkdir /work/plane/src RUN echo "fn main() {}" > /work/plane/src/main.rs +RUN mkdir -p /work/dynamic-proxy/src +RUN touch /work/dynamic-proxy/src/lib.rs + RUN mkdir -p /work/plane/plane-tests/src RUN mkdir -p /work/plane/plane-tests/plane-test-macro/src RUN mkdir -p /work/plane/plane-dynamic/src @@ -19,10 +23,12 @@ RUN touch /work/plane/plane-tests/src/lib.rs RUN touch /work/plane/plane-dynamic/src/lib.rs RUN cargo build -p plane --release --locked +RUN cargo build -p dynamic-proxy --release --locked COPY .cargo .cargo COPY .git .git COPY plane plane +COPY dynamic-proxy dynamic-proxy RUN cargo build -p plane --release --locked FROM gcr.io/distroless/cc-debian12 diff --git a/docker/quickstart/Dockerfile b/docker/quickstart/Dockerfile index d6fa2e199..b945f5086 100644 --- a/docker/quickstart/Dockerfile +++ b/docker/quickstart/Dockerfile @@ -6,6 +6,7 @@ FROM rust:bookworm as builder WORKDIR /work COPY Cargo.toml /work/ COPY Cargo.lock /work/ +COPY dynamic-proxy/Cargo.toml /work/dynamic-proxy/Cargo.toml COPY plane/Cargo.toml /work/plane/Cargo.toml COPY plane/plane-tests/plane-test-macro/Cargo.toml /work/plane/plane-tests/plane-test-macro/Cargo.toml COPY plane/plane-tests/Cargo.toml /work/plane/plane-tests/Cargo.toml @@ -14,6 +15,9 @@ COPY plane/plane-dynamic/Cargo.toml /work/plane/plane-dynamic/Cargo.toml RUN mkdir /work/plane/src RUN echo "fn main() {}" > /work/plane/src/main.rs +RUN mkdir -p /work/dynamic-proxy/src +RUN touch /work/dynamic-proxy/src/lib.rs + RUN mkdir -p /work/plane/plane-tests/src RUN mkdir -p /work/plane/plane-tests/plane-test-macro/src RUN mkdir -p /work/plane/plane-dynamic/src @@ -22,10 +26,12 @@ RUN touch /work/plane/plane-tests/src/lib.rs RUN touch /work/plane/plane-dynamic/src/lib.rs RUN cargo build -p plane --release --locked +RUN cargo build -p dynamic-proxy --release --locked COPY .cargo .cargo COPY .git .git COPY plane plane +COPY dynamic-proxy dynamic-proxy RUN cargo build -p plane --release --locked # =======