generated from dreamer-coding/meson-lib-c
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
43 lines (36 loc) · 851 Bytes
/
Dockerfile
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
# Use a specific Ubuntu base image
FROM ubuntu:20.04
# Set environment variables to avoid interaction
ENV DEBIAN_FRONTEND=noninteractive \
TZ=UTC
# Install system dependencies and clean up
RUN apt-get update && \
apt-get install -y \
build-essential \
gcc \
g++ \
gdb \
libstdc++-10-dev \
rustc \
cargo \
wget \
python3 \
python3-pip \
git \
tzdata && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install --no-cache-dir meson ninja
# Set environment variables
ENV CC=/usr/bin/gcc
ENV CXX=/usr/bin/g++
ENV LD_LIBRARY_PATH=/usr/local/lib
# Set the working directory
WORKDIR /usr/src/app
# Copy the source code
COPY . .
# Set the working directory
RUN meson setup builddir
RUN meson compile -C builddir
RUN meson test -C builddir
RUN meson install -C builddir