'docker container didn't send any data

running docker build -t <IMAGE_NAME> . then running docker run -p 8080:8080 <IMAGE_NAME> logs to console that it works but 127.0.0.1:8080 does not display the client

https://user-images.githubusercontent.com/72412733/169354228-2ab6bc5b-4cdd-4026-afe4-5c41f8c50717.png

https://user-images.githubusercontent.com/72412733/169354294-f0140f59-dbe7-4327-bceb-afcf75681f9a.png

Dockerfile:

FROM rust:1.60.0-slim-buster

WORKDIR /app

COPY . .

RUN rustup target add wasm32-unknown-unknown
RUN cargo install --locked --version 0.15.0 trunk
RUN trunk build --release

EXPOSE 8080

CMD ["trunk", "serve", "--release"]

Cargo.toml

[package]
name = "yew-whos-that-pokemon-client"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
getrandom = { version = "0.2.4", features = ["js"] }
rand = "0.8.5"
reqwest = "0.11.10"
serde_json = "1.0.81"
wasm-bindgen-futures = "0.4.30"
web-sys = "0.3.57"
yew = "0.19.3"

this works perfectly fine locally and i tried with multiple browsers

reference to source code if needed to solve this issue: https://github.com/apinanyogaratnam/yew-whos-that-pokemon-client

any help will be appreciated, thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source