Closed Wellnitz-Stefan closed 3 months ago
Worked with:
# Use an official C++ environment as a parent image
FROM ubuntu:latest
# Avoid user interaction with tzdata when installing packages
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/London
# Install any needed packages and libraries
RUN apt-get update && apt-get install -y \
wget \
g++ \
cmake \
pkg-config \
git \
libssl-dev \
build-essential \
checkinstall \
tzdata \
gdb \
python3 \
python3-pip \
python3-requests \
python3-cryptography
# Configure the timezone
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
# Download and install LibreSSL
ARG LIBRESSL_VERSION=3.9.2
WORKDIR /tmp
RUN wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRESSL_VERSION}.tar.gz \
&& tar -xzvf libressl-${LIBRESSL_VERSION}.tar.gz \
&& cd libressl-${LIBRESSL_VERSION} \
&& ./configure --prefix=/usr/local/libressl \
&& make -j$(nproc) \
&& make check \
&& make install
# Set the LIBRESSL_ROOT_DIR environment variable
ENV LIBRESSL_ROOT_DIR=/usr/local/libressl
# Update PATH environment variable
ENV PATH="/usr/local/libressl/bin:${PATH}"
# Installation von oatpp
RUN mkdir -p /opt/oatpp/oatpp && cd /opt/oatpp/oatpp \
&& git clone --depth=1 --branch=master https://github.com/oatpp/oatpp.git . \
&& mkdir build && cd build \
&& cmake .. \
&& make -j2 \
&& make install
# Installation von oatpp-libressl
RUN mkdir -p /opt/oatpp/oatpp-libressl && cd /opt/oatpp/oatpp-libressl \
&& git clone --depth=1 --branch=update_libressl https://github.com/oatpp/oatpp-libressl.git . \
&& mkdir build && cd build \
&& cmake .. \
&& make -j2 \
&& make install
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Make port 8000 available to the world outside this container
EXPOSE 8000
# Define environment variable
ENV NAME World
# Command to run the application
CMD ["/bin/bash"]
Building oatpp and oatpp-libressl in a docker-container:
Getting this error:
Please advise