-
Notifications
You must be signed in to change notification settings - Fork 328
DIY Dockerfile.repo not honoring cargo locks results in non-deterministic builds #8983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,13 +17,13 @@ RUN rustup component add rustfmt | |
| # Copy the router source to our build environment | ||
| COPY . . | ||
|
|
||
| # Build and install the router | ||
| RUN cargo install --path apollo-router | ||
| # Build the router | ||
| RUN cargo build --release -p apollo-router | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is what the ci build uses, lets use this which honors the lockfile and so the DIY more closely aligns to the ci build. |
||
|
|
||
| # Make directories for config and schema | ||
| RUN mkdir -p /dist/config && \ | ||
| mkdir /dist/schema && \ | ||
| mv /usr/local/cargo/bin/router /dist | ||
| mv target/release/router /dist | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since we are building and not installing now |
||
|
|
||
| # Copy configuration for docker image | ||
| COPY dockerfiles/router.yaml /dist/config | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because this didnt have --locked it was not honoring the cargo lock, and builds of an identical hash could end up with a different version of libraries.