-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (37 loc) · 1.08 KB
/
Copy pathDockerfile
File metadata and controls
47 lines (37 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM alpine:latest
RUN apk update && apk add --no-cache \
g++ \
make \
just \
git \
cmake \
libstdc++ \
linux-headers \
boost-dev \
zlib-dev \
openssl-dev \
wget \
asio-dev \
sqlite-dev
# Clone and build Crow
RUN git clone https://github.com/CrowCpp/Crow.git /tmp/crow && \
mkdir /tmp/crow/build && \
cd /tmp/crow/build && \
cmake .. -DCROW_BUILD_EXAMPLES=OFF -DCROW_BUILD_TESTS=OFF -DCROW_ENABLE_SSL=ON -DCROW_ENABLE_COMPRESSION=ON && \
make && \
make install
WORKDIR /app
# Download lodepng files
RUN wget https://raw.githubusercontent.com/lvandeve/lodepng/master/lodepng.cpp -O /usr/local/include/lodepng.cpp && \
wget https://raw.githubusercontent.com/lvandeve/lodepng/master/lodepng.h -O /usr/local/include/lodepng.h
# Copy the current directory contents into the container at /app
COPY main.cpp .
COPY justfile .
COPY templates templates
COPY static static
# Compile the app C++ code
RUN just
# Expose the required ports for networking (e.g., 8080)
EXPOSE 8080
# Run the compiled program
CMD ["./lean_machines_app"]