From 43032ff1a741027da584ba0ead203887e144a1e2 Mon Sep 17 00:00:00 2001 From: "liu.shiyu" Date: Mon, 17 Jun 2024 15:07:53 +0800 Subject: [PATCH] fix: socket addr --- Dockerfile | 2 ++ src/main.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f90a726..5a3c00a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,4 +14,6 @@ WORKDIR /usr/src/app COPY --from=builder /usr/src/app/target/release/registry-mirror-proxy . +EXPOSE [3000] + CMD ["./registry-mirror-proxy"] \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 6781a2f..bda0976 100644 --- a/src/main.rs +++ b/src/main.rs @@ -76,7 +76,7 @@ async fn perform_docker_pull_push(image_name: &str, image_reference: &str) -> Re #[tokio::main] async fn main() { - let addr = ([127, 0, 0, 1], 3000).into(); + let addr = ([0, 0, 0, 0], 3000).into(); let make_svc = make_service_fn(|_conn| async { Ok::<_, Infallible>(service_fn(handle_request))