bitwarden_rs_ldap/Dockerfile.alpine

27 lines
703 B
Docker
Raw Permalink Normal View History

FROM ekidd/rust-musl-builder:1.57.0 AS builder
2019-04-19 01:13:31 +00:00
WORKDIR /home/rust/src
# Cache build deps
2019-04-19 01:13:31 +00:00
RUN USER=rust cargo init
2021-07-23 22:52:34 +00:00
COPY --chown=rust:rust Cargo.toml Cargo.lock ./
RUN cargo build --locked --release && \
rm src/*.rs
2019-04-19 01:13:31 +00:00
COPY --chown=rust:rust ./src ./src
2021-07-23 22:52:34 +00:00
RUN USER=rust touch ./src/main.rs
# hadolint ignore=DL3059
RUN cargo build --release
2019-04-19 01:13:31 +00:00
FROM alpine:3
2023-01-25 23:58:21 +00:00
# hadolint ignore=DL3018
RUN apk --no-cache add ca-certificates
2019-04-19 01:13:31 +00:00
COPY --from=builder \
2021-05-07 19:55:29 +00:00
/home/rust/src/target/x86_64-unknown-linux-musl/release/vaultwarden_ldap \
2019-04-19 01:13:31 +00:00
/usr/local/bin/
COPY alpine_deprecation.sh /usr/local/bin/alpine_deprecation.sh
ENTRYPOINT ["/usr/local/bin/alpine_deprecation.sh"]
2021-05-07 19:55:29 +00:00
CMD ["/usr/local/bin/vaultwarden_ldap"]