-
Notifications
You must be signed in to change notification settings - Fork 20
chore: rust dockerfile #80
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
base: main
Are you sure you want to change the base?
Conversation
|
👋 Thanks for assigning @tankyleo as a reviewer! |
|
🔔 1st Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
🔔 2nd Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
🔔 3rd Reminder Hey @tankyleo! This PR has been waiting for your review. |
tankyleo
left a comment
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.
Thanks ! can you make this one commit / remove the merge commit in the current PR ?
| # Copy workspace files | ||
| COPY Cargo.toml Cargo.lock ./ | ||
| COPY rustfmt.toml ./ | ||
|
|
||
| # Copy all workspace members | ||
| COPY server ./server | ||
| COPY api ./api | ||
| COPY impls ./impls | ||
| COPY auth-impls ./auth-impls |
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.
Not familiar with Docker, looked elsewhere sounds like we could replace all these lines with just COPY . . ?
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.
If we do COPY . . it would need to have a .dockerignore file with things like target/** and similar, otherwise it would unnecessarily copy compile stuff and make the build process take longer.
Let me know what you prefer.
rust/Dockerfile
Outdated
| ca-certificates \ | ||
| libssl3 \ |
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.
Wasn't aware of these dependencies are you sure these are needed ?
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.
Likely yes (cf. #77), though IIRC I had to also install libssl-dev and pkg-config, too (cf. https://docs.rs/openssl/latest/openssl/#automatic).
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.
without libssl3 I get:
error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory
when trying to run the image
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.
ca-certificate seems not needed, I'll remove it, thanks.
rust/Dockerfile
Outdated
| COPY --from=builder /build/target/release/vss-server /app/vss-server | ||
|
|
||
| # Copy default configuration file | ||
| #COPY server/vss-server-config.toml /app/vss-server-config.toml |
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.
For now this step is mandatory, so let's not comment it out.
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.
We are using an external vss-server-config.toml on our k8s setup, but I guess even if this is included we can still mount and overwrite it, so I'll un-comment it here, thanks.
fixes #74