diff --git a/Docker/wolfCLU/Dockerfile b/Docker/wolfCLU/Dockerfile new file mode 100644 index 000000000..4333c13db --- /dev/null +++ b/Docker/wolfCLU/Dockerfile @@ -0,0 +1,22 @@ +FROM ubuntu as BUILDER + +ARG DEPS_WOLFSSL="build-essential autoconf libtool zlib1g-dev libuv1-dev libpam0g-dev git libpcap-dev libcurl4-openssl-dev bsdmainutils netcat iputils-ping bubblewrap" +RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \ + && apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} \ + && apt clean -y && rm -rf /var/lib/apt/lists/* + +ARG NUM_CPU=16 + +# This arg is to force a rebuild starting from this line +ARG DUMMY=date +# install wolfssl +RUN DUMMY=${DUMMY} git clone --depth=1 --single-branch --branch=master http://github.com/wolfssl/wolfssl && cd wolfssl && ./autogen.sh && ./configure --enable-all && make -j $NUM_CPU && make install && ldconfig + +# install wolfCLU +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 + +FROM ubuntu +COPY --from=BUILDER /usr/local/lib/libwolfssl.so /usr/local/lib/ +COPY --from=BUILDER /usr/local/bin/wolfssl* /usr/local/bin/ +RUN ldconfig +ENTRYPOINT ["/usr/local/bin/wolfssl"] diff --git a/Docker/wolfCLU/README.md b/Docker/wolfCLU/README.md new file mode 100644 index 000000000..1fc7bc6de --- /dev/null +++ b/Docker/wolfCLU/README.md @@ -0,0 +1,10 @@ +This is a small container that has wolfCLU installed for quick access. To build your own run the following: +``` +docker build --pull --build-arg DUMMY=$(date +%s) -t wolfclu . +``` + +To run the container, you can use: +``` +docker run -it --rm -v $(pwd):/ws -w /ws wolfclu version +``` +This command will allow you to use the certs/keys in your local directory.