I'm using a multistage Dockerfile to run my actix
webserver. If I call my endpoints then I always get a 404 error. If I run the webserver without multistage then everything works fine.
Dockerfile
# Build stage
FROM rust:slim-buster as builder
RUN apt-get update && \
apt-get install -y pkg-config make g++ libssl-dev cmake libmariadb-dev-compat openssl && \
rustup target add x86_64-unknown-linux-gnu
WORKDIR /var/www/app
COPY . .
RUN cargo build --bin my-app
# Prod stage, removing the Rust toolchain
FROM gcr.io/distroless/cc
COPY --from=builder /var/www/app/config /config
COPY --from=builder /var/www/app/target/debug/my-app /
EXPOSE 8088
CMD ["./my-app"]
2023-08-24T09:57:42.167Z INFO [actix_web::middleware::logger] 172.18.0.1 "GET /api/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0" 0.000401