mirror of
https://github.com/ViViDboarder/bitwarden_rs_ldap.git
synced 2024-11-21 18:56:27 +00:00
1111b2a3df
This also requried a Rust upgrade. Verified with `make itest`
24 lines
586 B
Docker
24 lines
586 B
Docker
FROM ekidd/rust-musl-builder:1.57.0 AS builder
|
|
|
|
WORKDIR /home/rust/src
|
|
|
|
# Cache build deps
|
|
RUN USER=rust cargo init
|
|
COPY --chown=rust:rust Cargo.toml Cargo.lock ./
|
|
RUN cargo build --locked --release && \
|
|
rm src/*.rs
|
|
|
|
COPY --chown=rust:rust ./src ./src
|
|
RUN USER=rust touch ./src/main.rs
|
|
# hadolint ignore=DL3059
|
|
RUN cargo build --release
|
|
|
|
FROM alpine:3
|
|
# hadolint ignore=DL3018
|
|
RUN apk --no-cache add ca-certificates
|
|
COPY --from=builder \
|
|
/home/rust/src/target/x86_64-unknown-linux-musl/release/vaultwarden_ldap \
|
|
/usr/local/bin/
|
|
|
|
CMD ["/usr/local/bin/vaultwarden_ldap"]
|