-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (25 loc) · 761 Bytes
/
Dockerfile
File metadata and controls
34 lines (25 loc) · 761 Bytes
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
# Use an official image as a base image
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
# Set the working directory inside the container
WORKDIR /app
# Install necessary dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
ninja-build \
&& rm -rf /var/lib/apt/lists/*
# Copy the C++ project files into the container
COPY . .
# Create a build directory
RUN mkdir build
# Set the working directory to the build directory
WORKDIR /app/build
# Run CMake to generate build files
RUN cmake -G Ninja ..
# Build the C++ project using Ninja
RUN ninja
# Set the working directory back to the project directory
WORKDIR /app
# Specify the command to run when the container starts
CMD ["./build/EchoSymbolService"]