2023-05-01 15:28:39 -04:00
|
|
|
ARG DOCKER_BASE_IMAGE=ubuntu
|
2024-11-22 14:37:26 -05:00
|
|
|
FROM ubuntu AS builder
|
2023-03-08 15:13:45 -05:00
|
|
|
|
2024-07-12 15:48:19 -04:00
|
|
|
ARG DEPS_WOLFSSL="build-essential autoconf libtool zlib1g-dev libuv1-dev libpam0g-dev git libpcap-dev libcurl4-openssl-dev bsdmainutils netcat-traditional iputils-ping bubblewrap"
|
2023-03-08 15:13:45 -05:00
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \
|
2024-08-09 14:22:38 -04:00
|
|
|
&& apt install -y ${DEPS_WOLFSSL} \
|
2023-03-08 15:13:45 -05:00
|
|
|
&& 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
|
|
|
|
|
|
2023-05-01 15:28:39 -04:00
|
|
|
FROM ${DOCKER_BASE_IMAGE}
|
|
|
|
|
USER root
|
2024-11-22 14:37:26 -05:00
|
|
|
COPY --from=builder /usr/local/lib/libwolfssl.so /usr/local/lib/
|
|
|
|
|
COPY --from=builder /usr/local/bin/wolfssl* /usr/local/bin/
|
2023-03-08 15:13:45 -05:00
|
|
|
RUN ldconfig
|
2023-09-28 14:45:51 -04:00
|
|
|
ENTRYPOINT ["/usr/local/bin/wolfssl"]
|
2023-05-01 15:28:39 -04:00
|
|
|
LABEL org.opencontainers.image.source=https://github.com/wolfssl/wolfssl
|
|
|
|
|
LABEL org.opencontainers.image.description="Simple wolfCLU in a container"
|