bonus-edge-proxy/docker/dev/Dockerfile.bak

53 lines
1.7 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# =================================================================
# Edge Proxy - Development Environment Dockerfile (V2)
# =================================================================
FROM arm64v8/ubuntu:22.04
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
COPY . /tmp/build-context
RUN apt-get update && \
apt-get install -y \
build-essential \
cmake \
git \
gdb \
vim \
libssl-dev \
# --- 新增依赖 ---
# spdlog 开发库
libspdlog-dev \
# Boost C++ 开发库 (这是一个元数据包会安装所有Boost库)
# 提醒: libboost-all-dev 体积较大,对于生产环境镜像,
# 后续可以优化为只安装需要的特定模块 (例如 libboost-system-dev)。
# 但对于开发环境,它提供了最大的便利性。
libboost-all-dev && \
# Paho MQTT C++ 客户端库及其依赖
# --- 步骤 2: 编译并安装 Paho C 库 ---
echo "--- Building and installing Paho MQTT C Library ---" && \
cd /tmp/build-context/external/paho.mqtt.c && \
cmake -Bbuild -H. \
-DPAHO_WITH_SSL=ON \
-DPAHO_BUILD_SAMPLES=OFF \
-DPAHO_BUILD_DOCUMENTATION=OFF && \
cmake --build build --target install && \
\
# libpaho-mqttpp-dev \
echo "--- Building and installing Paho MQTT C++ Library ---" && \
cd /tmp/build-context/external/paho.mqtt.cpp && \
# 编译并安装
cmake -Bbuild -H. -DPAHO_WITH_SSL=ON -DPAHO_BUILD_SAMPLES=OFF -DPAHO_BUILD_DOCUMENTATION=OFF && \
cmake --build build --target install && \
# 清理工作
ldconfig && \
rm -rf /tmp/build-context && \
# 清理apt缓存减小镜像体积
rm -rf /var/lib/apt/lists/*