-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (17 loc) · 819 Bytes
/
Dockerfile
File metadata and controls
26 lines (17 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM rust:1.79.0-buster AS builder
LABEL version="1.9.0"
LABEL name="Cosmian CLI and PKCS11 container"
ENV OPENSSL_DIR=/usr/local/openssl
WORKDIR /root
COPY . /root/cli
WORKDIR /root/cli
ARG TARGETPLATFORM
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then export ARCHITECTURE=x86_64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then export ARCHITECTURE=arm; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then export ARCHITECTURE=arm64; else export ARCHITECTURE=x86_64; fi \
&& bash /root/cli/.github/reusable_scripts/get_openssl_binaries.sh
RUN cargo build -p cosmian_cli -p cosmian_pkcs11 --release
#
# KMS server
#
FROM debian:buster-slim AS cli
COPY --from=builder /root/cli/target/release/cosmian /usr/bin/
COPY --from=builder /root/cli/target/release/libcosmian_pkcs11.so /usr/lib/