mirror of
https://github.com/ViViDboarder/bitwarden_rs_ldap.git
synced 2024-11-22 03:06:27 +00:00
b04ee3a60a
Should add support for TLS 1.3 Also, this fixes the Alpine builds
24 lines
596 B
Docker
24 lines
596 B
Docker
FROM ekidd/rust-musl-builder:1.46.0 AS builder
|
|
|
|
# Cache build deps
|
|
RUN USER=rust cargo init
|
|
COPY Cargo.toml Cargo.lock ./
|
|
RUN cargo build --locked --release
|
|
|
|
# Remove temp src
|
|
RUN rm src/*.rs
|
|
# Remove bins to make sure we rebuild
|
|
# RUN rm ./target/release/deps/bitwarden_rs_ldap*
|
|
COPY --chown=rust:rust ./src ./src
|
|
RUN touch ./src/main.rs
|
|
|
|
RUN cargo build --release
|
|
|
|
FROM alpine:3
|
|
RUN apk --no-cache add ca-certificates=20191127-r4
|
|
COPY --from=builder \
|
|
/home/rust/src/target/x86_64-unknown-linux-musl/release/bitwarden_rs_ldap \
|
|
/usr/local/bin/
|
|
|
|
CMD ["/usr/local/bin/bitwarden_rs_ldap"]
|