Skip to content

Commit bdd4535

Browse files
Merge pull request #6361 from bandi13/minorContainerUpdates
Minor container updates
2 parents 06d5897 + 931f665 commit bdd4535

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

Docker/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ USER root
55

66
ARG 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"
77
ARG 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"
99
RUN 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
1919
RUN 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+
2225
USER ${UID}:${GID}

Docker/wolfCLU/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARG DOCKER_BASE_IMAGE=ubuntu
12
FROM ubuntu as BUILDER
23

34
ARG 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
1617
RUN 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
1921
COPY --from=BUILDER /usr/local/lib/libwolfssl.so /usr/local/lib/
2022
COPY --from=BUILDER /usr/local/bin/wolfssl* /usr/local/bin/
2123
RUN 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"

0 commit comments

Comments
 (0)