FROM rust:1.62 WORKDIR /usr/src/user-svc COPY . . RUN cargo build --release COPY ./target/release/user-svc-actix . RUN rm -r `ls | grep -v "user-svc-actix"` CMD ["user-svc-actix"]