-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (33 loc) · 1.16 KB
/
Dockerfile
File metadata and controls
38 lines (33 loc) · 1.16 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
# Define a new image from Ubuntu 2404
# Dockerfile → defines your environment (compiler, cmake, libraries, tools).
FROM ubuntu:24.04
# Install prerequisites
# - the backslash \ is used for line continuation
# - `-y` to automatically confirm installation
RUN \
# updates the package lists for upgrades for packages that need upgrading,
apt-get update && \
# install cmake, gcc, g++
apt-get install -y cmake && \
apt-get install -y gcc g++ && \
# install cppcheck
apt-get install -y cppcheck && \
# install clang tidy
apt-get install -y clang-tidy && \
# install lcov
apt-get install -y lcov && \
# install gtk4
apt-get install -y libgtkmm-4.0-dev
# Set the working directory inside the Docker image
WORKDIR /cpp-lab
# Copy all things from the build context (the directory where we run docker build) into the docker image being built
# Copy source code from host (build context) to image because the WORKDIR already set
# COPY . .
COPY . /cpp-lab
# # Build the main and test targets
# RUN \
# # create a build folder
# rm -rf build && mkdir build && \
# cd build && \
# cmake .. && \
# cmake --build .