azure-functions-rs
azure-functions-rs copied to clipboard
Question: Why is Cargo.lock .dockerignored by default
Hi! Thanks for the wonderful crate.
Just a quick question, why is Cargo.lock ignored in the copy operation over to the Docker-image by default?
As seen here: https://github.com/peterhuene/azure-functions-rs/blob/06ca809b5a182f48d65c4a3fbc9a810ab9028ec8/azure-functions-sdk/src/templates/new-app/dockerignore.hbs#L2
I can just remove it of course, but wondering if there is any benefit to keeping it ignored that I have not seen.
I don't remember why it was excluded and I can't think of a reason why it should be off the top of my head (the "publishing" support hasn't gotten much love in a long time).
If it isn't causing problems then the exclusion should be removed.
Okay! The reason I asked was because a CI build of mine broke for an app using azure-functions-rs, because another dependency I use had a breaking change in a patch version.
Sort of perfect storm of someone not properly following semver, coupled with the Cargo.lock not being copied into the Docker-image being built. It was a bit of a head-scratcher trying to figure out.
By the way, I noticed while doing the example code for #488 that the root Cargo.lock was being altered when building the example-code. Maybe that has something to do with it?