forked from terdia/mqttui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.multiarch
More file actions
30 lines (23 loc) · 818 Bytes
/
Dockerfile.multiarch
File metadata and controls
30 lines (23 loc) · 818 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
# Multi-architecture Dockerfile supporting both AMD64 and ARM64 (fixes issue #3)
FROM --platform=$TARGETPLATFORM python:3.9-slim
# Set build arguments for multi-platform builds
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "Building on $BUILDPLATFORM for $TARGETPLATFORM"
WORKDIR /app
# Install build dependencies for compiling packages on ARM platforms
RUN apt-get update && apt-get install -y \
build-essential \
gcc \
g++ \
libc6-dev \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt
COPY . .
# Use an entrypoint script to allow for variable substitution
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]