-
Notifications
You must be signed in to change notification settings - Fork 382
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
Add dockerfile for cross itself #667
Changes from 4 commits
45bdbaa
4c43cf6
3203802
b7d6c4f
cc5e8f1
fb673cc
c93c307
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM rust:latest | ||
|
||
ENV CROSS_DOCKER_IN_DOCKER=true | ||
|
||
ARG checksum="d9d9b964d428733e98c2579b91772af4 /usr/bin/docker" | ||
|
||
RUN wget -O- https://download.docker.com/linux/static/stable/x86_64/docker-20.10.9.tgz | tar -C /usr/bin/ --strip-components=1 -xzf - docker/docker | ||
RUN echo $checksum | md5sum -c | ||
|
||
RUN cargo install --git https://github.com/cross-rs/cross | ||
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 still wrong imo, I'd expect this to be built in our CI and published as it should also if anything use 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. Yes, this needs to be something like
|
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 need to check signature or checksum here so we don't rely on the file being unmodified in future.
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.
I don't think this is necessary.
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.
It is not rare for tarball files to change behind the scene, so ensuring it is valid is a good security matter.
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.
Is there a Docker image we can copy the binary from instead using a multi-stage build?
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.
There is a docker in docker image but it has some other binaries which are not necessary and rust has to be installed manually which takes more steps than this multi-stage build.
The docker in docker image receives it binaries from
download.docker.com
(layer 6) just like here, so there is no big difference when using the docker in docker image (besides the unwanted binaries which it has).