Hello everyone
I’ve created a CLI application in Rust and I’m trying to Dockerise it. I want to learn how to Dockerise CLI applications, but I’m not sure how to pass parameters to it.
FROM rust:1.95 as builder
WORKDIR /luffy/src/myapp
COPY . .
RUN cargo install build --path .
FROM debian:bullseye-slim
RUN apt-get update && apt-get install
My question is: how should I use CMD or ENTRYPOINT to pass commands to my container whilst it is running?
Thank you very much
This blog post should shed some light into the question:
You might also want to have a look at Multi-stage builds | Docker Docs, as the artifacts build in your builder stage need to be copied into the final stage. Though, your Dockerfile is incomplete and probably has a COPY --from=builder <src> <target> instruction in a part you didn’t share in your post.