chore: use ubuntu image to reduce image size (#142)

* chore: use ubuntu image to reduce image size

* fix(lint): hadolint issues
This commit is contained in:
DanCodes 2024-01-17 18:08:37 +00:00 committed by GitHub
parent 5f63df3dee
commit 0feac2d904
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,8 +18,9 @@ RUN rm ./target/release/deps/vaultwarden_ldap*
COPY src ./src COPY src ./src
RUN cargo build --release RUN cargo build --release
FROM rust:$RUN_TAG FROM ubuntu:focal
WORKDIR /app WORKDIR /app
RUN apt-get update -y && apt-get install -y libssl-dev=1.1.1f-1ubuntu2.20 --no-install-recommends && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/src/vaultwarden_ldap/target/release/vaultwarden_ldap /usr/local/bin/ COPY --from=builder /usr/src/vaultwarden_ldap/target/release/vaultwarden_ldap /usr/local/bin/
CMD ["/usr/local/bin/vaultwarden_ldap"] CMD ["/usr/local/bin/vaultwarden_ldap"]