Fixed dockerfile
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -6,25 +6,23 @@ WORKDIR /server
|
|||||||
|
|
||||||
# Install necessary packages, including CMake, a C++ compiler, and wget
|
# Install necessary packages, including CMake, a C++ compiler, and wget
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y cmake g++ make wget && \
|
apt-get install -y cmake g++ make wget zlib1g-dev && \
|
||||||
apt-get clean;
|
apt-get clean;
|
||||||
|
|
||||||
# Copy the current directory contents into the container at /app
|
# Copy the current directory contents into the container at /app
|
||||||
COPY . /server
|
COPY . /server
|
||||||
|
|
||||||
# Download Crow library
|
# Download Crow library
|
||||||
RUN wget https://github.com/CrowCpp/Crow/archive/refs/heads/master.zip -O crow.zip && \
|
RUN apt-get install ./lib/crow-1.2.1.deb -y
|
||||||
unzip crow.zip && \
|
|
||||||
mv Crow-master/crow/include/crow.h /usr/local/include/
|
|
||||||
|
|
||||||
# Make the build directory
|
# Make the build directory
|
||||||
RUN mkdir -p build && cd build
|
RUN mkdir -p build && cd build
|
||||||
|
|
||||||
# Run CMake to configure the build
|
# Run CMake to configure the build
|
||||||
RUN cmake ..
|
RUN cmake .
|
||||||
|
|
||||||
# Build the project
|
# Build the project
|
||||||
RUN make
|
RUN cmake --build .
|
||||||
|
|
||||||
# Expose port 8888 for the web server
|
# Expose port 8888 for the web server
|
||||||
EXPOSE 8888
|
EXPOSE 8888
|
||||||
|
|||||||
Reference in New Issue
Block a user