-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
18 lines (17 loc) · 765 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM rust:slim-buster AS rust_builder
RUN apt-get update && apt-get -y install libssl-dev && rm -rf /var/lib/apt/lists/*
RUN mkdir /repo && mkdir /repo/bin
ADD . /repo
WORKDIR /repo
RUN cargo build --example profile --release --no-default-features --features "with_pbkdf2" && \
mv target/release/examples/profile bin/vanilla_profile && \
cargo build --example profile --release --no-default-features --features "with_pbkdf2 fpbkdf2" && \
mv target/release/examples/profile bin/fastpbkdf2_profile && \
rm -rf target/release/examples
FROM python:3.11-slim-buster
RUN mkdir /app
WORKDIR /app
COPY --from=rust_builder /repo/bin/* /app/
RUN pip install django
ADD examples/profile.py .
CMD python profile.py && ./vanilla_profile && ./fastpbkdf2_profile