bitwarden_rs_ldap/Dockerfile
ViViDboarder 1111b2a3df Upgrade dependencies to replace vulnerable versions
This also requried a Rust upgrade.

Verified with `make itest`
2023-01-25 16:13:02 -08:00

26 lines
612 B
Docker

ARG BUILD_TAG=1.57.0
ARG RUN_TAG=$BUILD_TAG
FROM rust:$BUILD_TAG as builder
WORKDIR /usr/src/
RUN USER=root cargo new --bin vaultwarden_ldap
WORKDIR /usr/src/vaultwarden_ldap
# Compile dependencies
COPY Cargo.toml Cargo.lock ./
RUN cargo build --locked --release
# Remove bins to make sure we rebuild
# hadolint ignore=DL3059
RUN rm ./target/release/deps/vaultwarden_ldap*
# Copy source and install
COPY src ./src
RUN cargo build --release
FROM rust:$RUN_TAG
WORKDIR /app
COPY --from=builder /usr/src/vaultwarden_ldap/target/release/vaultwarden_ldap /usr/local/bin/
CMD ["/usr/local/bin/vaultwarden_ldap"]