forked from ArduPilot/MethodicConfigurator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (36 loc) · 1.26 KB
/
Dockerfile
File metadata and controls
45 lines (36 loc) · 1.26 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
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/
RUN pip install -e ".[dev]"
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"]