Fix cargo ignoring lockfile when building syncserver image (#3856)

* pass --locked to cargo invocation

* update Dockerfile.distroless as well

Co-authored-by: Simon <8466614+SimonBaars@users.noreply.github.com>

---------

Co-authored-by: Simon <8466614+SimonBaars@users.noreply.github.com>
This commit is contained in:
llama 2025-03-14 18:04:56 +08:00 committed by GitHub
parent d0ed54a768
commit d809ee92db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -7,6 +7,7 @@ RUN apk update && apk add --no-cache build-base protobuf && rm -rf /var/cache/ap
RUN cargo install --git https://github.com/ankitects/anki.git \ RUN cargo install --git https://github.com/ankitects/anki.git \
--tag ${ANKI_VERSION} \ --tag ${ANKI_VERSION} \
--root /anki-server \ --root /anki-server \
--locked \
anki-sync-server anki-sync-server
FROM alpine:3.21.0 FROM alpine:3.21.0

View file

@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y build-essential protobuf-compiler && ap
RUN cargo install --git https://github.com/ankitects/anki.git \ RUN cargo install --git https://github.com/ankitects/anki.git \
--tag ${ANKI_VERSION} \ --tag ${ANKI_VERSION} \
--root /anki-server \ --root /anki-server \
--locked \
anki-sync-server anki-sync-server
FROM gcr.io/distroless/cc-debian12 FROM gcr.io/distroless/cc-debian12