Recreated webstie in Dotnet
This commit is contained in:
32
douwco_website.cpp/Dockerfile
Normal file
32
douwco_website.cpp/Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
# Use an official Ubuntu as a parent image
|
||||
FROM ubuntu:latest
|
||||
|
||||
# Set the working directory in the container to /app
|
||||
WORKDIR /server
|
||||
|
||||
# Install necessary packages, including CMake, a C++ compiler, and wget
|
||||
RUN apt-get update && \
|
||||
apt-get install -y cmake g++ make wget zlib1g-dev && \
|
||||
apt-get clean;
|
||||
|
||||
# Download Crow library
|
||||
RUN wget https://github.com/CrowCpp/Crow/releases/download/v1.2.1.2/Crow-1.2.1-Linux.deb && \
|
||||
apt-get install -y ./Crow-1.2.1-Linux.deb
|
||||
|
||||
# Copy the current directory contents into the container at /app
|
||||
COPY . /server
|
||||
|
||||
# Make the build directory
|
||||
RUN mkdir -p build && cd build
|
||||
|
||||
# Run CMake to configure the build
|
||||
RUN cmake .
|
||||
|
||||
# Build the project
|
||||
RUN cmake --build .
|
||||
|
||||
# Expose port 8888 for the web server
|
||||
EXPOSE 8888
|
||||
|
||||
# Command to run the executable
|
||||
CMD ["./douwco_web"]
|
||||
Reference in New Issue
Block a user