bitwarden_rs_ldap/Dockerfile

26 lines
736 B
Docker
Raw Normal View History

FROM rust:1.82 as builder
WORKDIR /usr/src/
2021-05-07 19:55:29 +00:00
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
2021-05-07 19:55:29 +00:00
RUN rm ./target/release/deps/vaultwarden_ldap*
# Copy source and install
COPY src ./src
RUN cargo build --release
2024-07-12 22:47:00 +00:00
# Use most recent ubuntu LTS release
FROM ubuntu:24.04
RUN apt-get update \
2024-08-15 07:50:16 +00:00
&& apt-get install -y --no-install-recommends 'ca-certificates=20240203' 'libssl-dev=3.*' \
2024-07-12 22:47:00 +00:00
&& rm -rf /var/cache/apt/lists
COPY --from=builder /usr/src/vaultwarden_ldap/target/release/vaultwarden_ldap /usr/local/bin/
CMD ["/usr/local/bin/vaultwarden_ldap"]