bitwarden_rs_ldap/Dockerfile.alpine

23 lines
573 B
Docker
Raw Normal View History

FROM ekidd/rust-musl-builder:1.51.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
2022-01-20 20:52:59 +00:00
RUN apk --no-cache add ca-certificates=20211220-r0
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/
2021-05-07 19:55:29 +00:00
CMD ["/usr/local/bin/vaultwarden_ldap"]