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: cargo install ignoring Cargo.lock #1047

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WORKDIR /usr/src/policy-server
COPY ./ ./

RUN cargo install cargo-auditable
RUN cargo auditable install --target aarch64-unknown-linux-musl --path .
RUN cargo auditable install --locked --target aarch64-unknown-linux-musl --path .
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wouldn't it be better to run build --release instead of install?

Copy link
Member

Choose a reason for hiding this comment

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

I think is fine to do that. We just need to copy the binary later, in the final image, from a different place.

Copy link
Member

Choose a reason for hiding this comment

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

I would be fine replacing the install with build --release as long as this doesn't make the Dockerfile more complicated (this is a multi-arch image, the build artifact would be located under two different paths, based on the architecture)


FROM --platform=${BUILDPLATFORM} ghcr.io/cross-rs/x86_64-unknown-linux-musl:0.2.5 AS build-amd64
ARG BUILDPLATFORM
Expand All @@ -32,7 +32,7 @@ WORKDIR /usr/src/policy-server
COPY ./ ./

RUN cargo install cargo-auditable
RUN cargo auditable install --target x86_64-unknown-linux-musl --path .
RUN cargo auditable install --locked --target x86_64-unknown-linux-musl --path .

FROM --platform=$BUILDPLATFORM alpine:3.21.2 AS cfg
RUN echo "policy-server:x:65533:65533::/tmp:/sbin/nologin" >> /etc/passwd
Expand Down
Loading