2020-09-28 21:58:23 +00:00
|
|
|
FROM rust:1.46
|
2019-03-31 03:03:46 +00:00
|
|
|
|
2019-04-12 00:07:59 +00:00
|
|
|
WORKDIR /usr/src/
|
|
|
|
RUN USER=root cargo new --bin bitwarden_rs_ldap
|
|
|
|
WORKDIR /usr/src/bitwarden_rs_ldap
|
2019-03-31 03:03:46 +00:00
|
|
|
|
2019-04-12 00:07:59 +00:00
|
|
|
# Compile dependencies
|
2020-07-09 19:04:05 +00:00
|
|
|
COPY Cargo.toml Cargo.lock ./
|
|
|
|
RUN cargo build --locked --release
|
2019-04-12 00:07:59 +00:00
|
|
|
|
2020-07-09 19:04:05 +00:00
|
|
|
# Remove bins to make sure we rebuild
|
2019-04-12 00:07:59 +00:00
|
|
|
RUN rm ./target/release/deps/bitwarden_rs_ldap*
|
2020-07-09 19:04:05 +00:00
|
|
|
# Copy source and install
|
|
|
|
COPY src ./src
|
2019-03-31 03:03:46 +00:00
|
|
|
RUN cargo install --path .
|
|
|
|
|
|
|
|
CMD ["bitwarden_rs_ldap"]
|