-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
30 lines (23 loc) · 887 Bytes
/
Dockerfile
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
27
28
29
30
FROM ubuntu:latest
# Install dependencies
RUN apt-get -y update && \
apt-get install -y build-essential git cmake libssl-dev
# Get liboqs
RUN git clone --depth 1 --branch main https://github.com/open-quantum-safe/liboqs
# Install liboqs
RUN cmake -S liboqs -B liboqs/build -DBUILD_SHARED_LIBS=ON && \
cmake --build liboqs/build --parallel 4 && \
cmake --build liboqs/build --target install
# Enable a normal user
RUN useradd -m -c "Open Quantum Safe" oqs
USER oqs
WORKDIR /home/oqs
# Get liboqs-cpp
RUN git clone --depth 1 --branch main https://github.com/open-quantum-safe/liboqs-cpp.git
# Configure and install liboqs-cpp
RUN cmake -S liboqs-cpp -B liboqs-cpp/build
USER root
RUN cmake --build liboqs-cpp/build --target install
USER oqs
# Build liboqs-cpp examples and unit tests
RUN cmake --build liboqs-cpp/build --target examples --target unit_tests --parallel 4