Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (39 loc) · 1.54 KB
/
Copy pathDockerfile
File metadata and controls
48 lines (39 loc) · 1.54 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
FROM python:3.12-slim-bookworm@sha256:593bd06efe90efa80dc4eee3948be7c0fde4134606dd40d8dd8dbcade98e669c
LABEL maintainer="ArduPilot Methodic Configurator Team"
LABEL description="Development environment for ArduPilot Methodic Configurator with SITL support"
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV DISPLAY=:99
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
python3-tk \
xvfb \
x11-utils \
gnome-screenshot \
libusb-1.0-0 \
procps \
libatomic1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY pyproject.toml README.md LICENSE.md ./
COPY ardupilot_methodic_configurator/ ./ardupilot_methodic_configurator/
COPY tests/ ./tests/
COPY scripts/ ./scripts/
# Bootstrap uv, then install test and frozen-archive dependencies using project pins.
RUN pip install "uv==0.12.6" && \
uv pip install --system -e ".[dev,linux_dist]" && \
python -c "from PyInstaller.archive.readers import ZlibArchiveReader; from PyInstaller.archive.writers import ZlibArchiveWriter"
RUN chmod +x scripts/*.sh && \
mkdir -p sitl sitl-cache && \
touch /root/.Xauthority && \
echo '#!/bin/bash' > /entrypoint.sh && \
echo 'rm -f /tmp/.X99-lock' >> /entrypoint.sh && \
echo 'Xvfb :99 -screen 0 1024x768x24 -ac &' >> /entrypoint.sh && \
echo 'sleep 2' >> /entrypoint.sh && \
echo 'exec "$@"' >> /entrypoint.sh && \
chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["python", "-m", "pytest", "-v", "-rs"]