Dockerfile 1.3 KB

1234567891011121314151617181920212223242526
  1. ARG DOCKER_BASE_IMAGE=ubuntu
  2. FROM ubuntu as BUILDER
  3. ARG DEPS_WOLFSSL="build-essential autoconf libtool zlib1g-dev libuv1-dev libpam0g-dev git libpcap-dev libcurl4-openssl-dev bsdmainutils netcat iputils-ping bubblewrap"
  4. RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \
  5. && apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} \
  6. && apt clean -y && rm -rf /var/lib/apt/lists/*
  7. ARG NUM_CPU=16
  8. # This arg is to force a rebuild starting from this line
  9. ARG DUMMY=date
  10. # install wolfssl
  11. 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
  12. # install wolfCLU
  13. 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
  14. FROM ${DOCKER_BASE_IMAGE}
  15. USER root
  16. COPY --from=BUILDER /usr/local/lib/libwolfssl.so /usr/local/lib/
  17. COPY --from=BUILDER /usr/local/bin/wolfssl* /usr/local/bin/
  18. RUN ldconfig
  19. ENTRYPOINT ["/usr/local/bin/wolfssl"]
  20. LABEL org.opencontainers.image.source=https://github.com/wolfssl/wolfssl
  21. LABEL org.opencontainers.image.description="Simple wolfCLU in a container"