Skip to content
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

fix: dockerfile -- bump rust version & add build pkgs #214

Closed
wants to merge 2 commits into from

Conversation

sarmatdev
Copy link
Contributor

Bump rust version, required by cargo-chef

Screenshot 2024-03-30 at 17 36 10

Introduced set of build packages for compilation

Screenshot 2024-03-30 at 18 11 59

@sarmatdev
Copy link
Contributor Author

@ralexstokes need your touch to resolve lint checks

Copy link
Owner

@ralexstokes ralexstokes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, thanks for this! I usually don't use docker so this has gotten a bit stale...

do you mind checking on a way to load the intended rust image from the rust toolchain file? I could see this being supported somewhat right out of the box

Dockerfile Outdated
@@ -1,4 +1,15 @@
FROM rust:1.67-bullseye AS chef
FROM rust:1.77-bullseye AS chef
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure if this is worth the complexity but it would be great if we could just read the rust-toolchain.toml file to load the current MSRV

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't found an approach to use rust version in Dockerfile, mb you can point me on some resources?
For now I added lukemathwalker/cargo-chef:latest-rust-slim-bullseye image

Comment on lines +3 to +11
RUN set -x \
&& apt-get -qq update \
&& apt-get -qq -y install \
clang \
cmake \
libudev-dev \
libssl-dev \
pkg-config \
zlib1g-dev
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these look fine but ill want to review the docker file to make sure these are all required (thinking about recent xz situation)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to find unnecessary packages incrementally, but all of them seems mandatory🤔

@ralexstokes ralexstokes changed the title fix: bump rust version & add build pkgs fix: dockerfile -- bump rust version & add build pkgs Apr 1, 2024
@ralexstokes
Copy link
Owner

@sarmatdev looks like some new linter errors due to a new nightly version... I'll try to get to these in the next few days

@ralexstokes
Copy link
Owner

yeah, the docker file is outdated and needs some more dependencies...

I have and expect to maintain the nix infra in this repo -- do you want to try something like this for the Dockerfile?

https://mitchellh.com/writing/nix-with-dockerfiles

you should be able to use the nix flake from the repo root, so just need to update the dockerfile

@ralexstokes
Copy link
Owner

closing in lieu of #219
thanks for this!

(also I took a look at the nix route above and it was a bit more complicated than I would like...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants