File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ USER root
55
66ARG DEPS_WOLFSSL="build-essential autoconf libtool clang clang-tools zlib1g-dev libuv1-dev libpam0g-dev valgrind git linux-headers-generic gcc-multilib g++-multilib libpcap-dev bubblewrap gdb iputils-ping lldb bsdmainutils netcat binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu"
77ARG DEPS_LIBOQS="astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind git"
8- ARG DEPS_TESTS="abi-dumper libcurl4-openssl-dev"
8+ ARG DEPS_TESTS="abi-dumper libcurl4-openssl-dev tcpdump "
99RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \
1010 && apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} ${DEPS_TESTS} \
1111 && apt clean -y && rm -rf /var/lib/apt/lists/*
@@ -19,4 +19,7 @@ RUN groupadd -f -g ${GID} docker && ( getent passwd ${UID} || useradd -ms /bin/b
1919RUN git clone --single-branch https://github.com/open-quantum-safe/liboqs.git && cd liboqs && git checkout af76ca3b1f2fbc1f4f0967595f3bb07692fb3d82 \
2020 && mkdir build && cd build && cmake -DOQS_DIST_BUILD=ON -DOQS_USE_CPUFEATURE_INSTRUCTIONS=OFF -DOQS_USE_OPENSSL=0 .. && make -j8 all && make install && cd ../.. && rm -rf liboqs
2121
22+ # Allow non-root to use tcpdump (will need NET_RAW and NET_ADMIN capability when running the container)
23+ RUN setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/tcpdump
24+
2225USER ${UID}:${GID}
Original file line number Diff line number Diff line change 1+ ARG DOCKER_BASE_IMAGE=ubuntu
12FROM ubuntu as BUILDER
23
34ARG DEPS_WOLFSSL="build-essential autoconf libtool zlib1g-dev libuv1-dev libpam0g-dev git libpcap-dev libcurl4-openssl-dev bsdmainutils netcat iputils-ping bubblewrap"
@@ -15,8 +16,11 @@ RUN DUMMY=${DUMMY} git clone --depth=1 --single-branch --branch=master http://gi
1516# install wolfCLU
1617RUN git clone --depth=1 --single-branch --branch=main http://github.com/wolfssl/wolfCLU && cd wolfCLU && ./autogen.sh && ./configure && make -j $NUM_CPU && make install
1718
18- FROM ubuntu
19+ FROM ${DOCKER_BASE_IMAGE}
20+ USER root
1921COPY --from=BUILDER /usr/local/lib/libwolfssl.so /usr/local/lib/
2022COPY --from=BUILDER /usr/local/bin/wolfssl* /usr/local/bin/
2123RUN ldconfig
22- ENTRYPOINT ["/usr/local/bin/wolfssl" ]
24+ CMD ["/usr/local/bin/wolfssl" ]
25+ LABEL org.opencontainers.image.source=https://github.com/wolfssl/wolfssl
26+ LABEL org.opencontainers.image.description="Simple wolfCLU in a container"
You can’t perform that action at this time.
0 commit comments