forked from f1xpl/openauto
-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathDockerfile
More file actions
91 lines (77 loc) · 2.45 KB
/
Dockerfile
File metadata and controls
91 lines (77 loc) · 2.45 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# * Project: OpenAuto
# * This file is part of openauto project.
# * Copyright (C) 2025 OpenCarDev Team
# *
# * openauto is free software: you can redistribute it and/or modify
# * it under the terms of the GNU General Public License as published by
# * the Free Software Foundation; either version 3 of the License, or
# * (at your option) any later version.
# *
# * openauto is distributed in the hope that it will be useful,
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# * GNU General Public License for more details.
# *
# * You should have received a copy of the GNU General Public License
# * along with openauto. If not, see <http://www.gnu.org/licenses/>.
# Multi-stage build for OpenAuto with native compilation for each architecture
# This Dockerfile builds OpenAuto natively on each target platform using QEMU emulation
# Allow selecting Debian base (bookworm or trixie). Default to trixie.
ARG DEBIAN_VERSION=trixie
FROM debian:${DEBIAN_VERSION}-slim
# Build arguments
ARG TARGET_ARCH=$(dpkg --print-architecture)
ARG BUILD_TYPE=release
ARG DEBIAN_FRONTEND=noninteractive
# Set locale to avoid encoding issues
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
# Install build dependencies and tools
RUN apt-get update && apt-get install -y \
# Core build tools
build-essential \
cmake \
pkg-config \
git \
lsb-release \
curl \
gnupg \
ca-certificates \
# Development libraries
libboost-system-dev \
libboost-log-dev \
libprotobuf-dev \
protobuf-compiler \
libusb-1.0-0-dev \
libssl-dev \
libblkid-dev \
libgps-dev \
libtag1-dev \
librtaudio-dev \
# Qt5 dependencies
qtbase5-dev \
qtmultimedia5-dev \
qttools5-dev \
qttools5-dev-tools \
qtconnectivity5-dev \
# Packaging tools
file \
dpkg-dev \
fakeroot \
&& rm -rf /var/lib/apt/lists/*
# Add OpenCarDev APT repository for libaasdk
ARG DEBIAN_VERSION
# Set working directory
WORKDIR /src
# Copy source code
COPY . .
# Debug: List what was copied
RUN echo "Contents of /src:" && ls -la
# Create output directory for packages
RUN mkdir -p /output
# Make build script executable
RUN chmod +x /src/build.sh
# Build OpenAuto using unified build script
RUN /src/build.sh ${BUILD_TYPE} --with-aasdk --package --output-dir /output
# Default command
CMD ["bash", "-c", "echo 'OpenAuto build container ready. Packages are in /output/'"]