Docker container not picking up Rocket.toml configuration - Resolved #1897
BlueyNeilo
started this conversation in
Show & Tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was trying to get Rocket running in a docker container, and followed the approach to compile from the rust tooling image
FROM rust:1.40 as builder
and then copy the executable over to a smaller imageFROM debian:buster-slim
COPY --from=builder ...
as per rust Docker pageProblem:
I assumed that Rocket.toml would pick up configuration during
cargo build
, but I was confused when I didn't see my port or address change in the logs when the container was running.Resolution:
It looks like it picks it up during runtime in the current directory.
Trick is to add the toml file in current directory before executing the rust application:
COPY Rocket.toml .
Beta Was this translation helpful? Give feedback.
All reactions