-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.build
More file actions
49 lines (42 loc) · 989 Bytes
/
Dockerfile.build
File metadata and controls
49 lines (42 loc) · 989 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# FoxNAS 构建环境 Dockerfile
# 用于在容器中编译 Qt/C++ 项目
FROM ubuntu:22.04
# 设置环境变量
ENV DEBIAN_FRONTEND=noninteractive
ENV QT_VERSION=6.4.2
# 安装基础依赖
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
wget \
python3 \
python3-pip \
pkg-config \
# Qt6 依赖
qt6-base-dev \
qt6-base-dev-tools \
qt6-tools-dev \
qt6-tools-dev-tools \
qt6-l10n-tools \
libqt6core5compat6-dev \
libqt6network6 \
libqt6widgets6 \
libqt6gui6 \
libqt6multimedia6 \
libqt6multimediawidgets6 \
qtmultimedia6-dev \
# 其他依赖
libssl-dev \
libcurl4-openssl-dev \
&& rm -rf /var/lib/apt/lists/*
# 设置工作目录
WORKDIR /workspace
# 复制项目文件
COPY . /workspace/
# 创建构建目录并编译
RUN mkdir -p build && cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc)
# 设置入口点
CMD ["./build/FoxNAS"]