# Use an official Ubuntu runtime as a parent image FROM debian:latest # Use Aliyun mirrors for apt-get RUN sed -i 's/http:\/\/archive.ubuntu.com\/ubuntu\//http:\/\/mirrors.aliyun.com\/ubuntu\//g' /etc/apt/sources.list # Update the package lists RUN apt-get update # Install build tools RUN apt-get install -y g++ make cmake autoconf automake libtool # Download and build libuv from source RUN apt-get install -y git RUN git clone https://github.com/libuv/libuv.git /usr/src/libuv WORKDIR /usr/src/libuv RUN sh autogen.sh RUN ./configure RUN make RUN make install # Add the libuv library path RUN ldconfig # Set the working directory to /app WORKDIR /app # Copy the source code into the container COPY . . # Compile the C++ program RUN g++ -std=c++14 -g -o proxyServer hv_utils.cpp tcp_inbound.cpp main.cpp -I include -lhv EXPOSE 8080 # Run my_program when the container launches CMD ["./proxyServer"]