Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ros_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Only push if it comes from tagging
- name: Build ardupilot-dev-ros images
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -20,7 +20,7 @@ repos:
- id: check-xml

- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
rev: v2.14.0
hooks:
- id: hadolint-docker
types: [file]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ In order to publish them to DockerHub, we need to make a release and tag the ima

The repo setting is quite simple, it needs GitHub Action and an account on DockerHub.
In order to be able to publish the image on DockerHub, you need to set two secrets on your repo setting :
`DOCKER_USERNAME` and `DOCKER_PASSWORD`
`DOCKER_USERNAME` and `DOCKERHUB_TOKEN`
18 changes: 9 additions & 9 deletions docker/Dockerfile_dev-armhf-musl
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# syntax=docker/dockerfile:1
ARG TAG="latest"
FROM ardupilot/ardupilot-dev-armhf:${TAG}
FROM ardupilot/ardupilot-dev-armhf:"${TAG}"

# Get ArduPilot MUSL ARM toolchain
ARG MUSL_ROOT="arm-linux-musleabihf-cross"
ARG MUSL_TARBALL="$MUSL_ROOT.tgz"
ARG MUSL_TARBALL="${MUSL_ROOT}.tgz"
# ARG MUSL_TARBALL_URL="https://musl.cc/$MUSL_TARBALL" # Seems prevent github actions from accessing the URL
ARG MUSL_TARBALL_URL="https://github.com/ArduPilot/ardupilot_dev_docker/releases/download/v0.1.4/$MUSL_TARBALL"
ARG MUSL_TARBALL_URL="https://github.com/ArduPilot/ardupilot_dev_docker/releases/download/v0.1.4/${MUSL_TARBALL}"

RUN set -eu \
&& mkdir -p /opt && cd /opt \
# Download to file with retries to avoid truncated archives
&& wget -q --tries=5 --timeout=30 -O "$MUSL_TARBALL" "$MUSL_TARBALL_URL" \
&& test -s "$MUSL_TARBALL" \
&& tar -xzf "$MUSL_TARBALL" \
&& rm -f "$MUSL_TARBALL" \
&& rm -rf "/opt/$MUSL_ROOT/share/doc"
&& wget -q --tries=5 --timeout=30 -O "${MUSL_TARBALL}" "${MUSL_TARBALL_URL}" \
&& test -s "${MUSL_TARBALL}" \
&& tar -xzf "${MUSL_TARBALL}" \
&& rm -f "${MUSL_TARBALL}" \
&& rm -rf "/opt/${MUSL_ROOT}/share/doc"

# manual ccache setup for new toolchain
RUN ln -s /usr/bin/ccache /usr/lib/ccache/arm-linux-musleabihf-g++ \
&& ln -s /usr/bin/ccache /usr/lib/ccache/arm-linux-musleabihf-gcc

# Set MUSL toolchain to the PATH
ENV PATH="/opt/$MUSL_ROOT/bin:$PATH"
ENV PATH="/opt/${MUSL_ROOT}/bin:$PATH"

# Set ccache to the PATH
ENV PATH="/usr/lib/ccache:$PATH"
47 changes: 30 additions & 17 deletions docker/Dockerfile_dev-base
Original file line number Diff line number Diff line change
@@ -1,43 +1,49 @@
# syntax=docker/dockerfile:1
FROM ubuntu:22.04 AS base
FROM ubuntu:24.04 AS base

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
lsb-release \
sudo \
wget \
software-properties-common \
astyle \
build-essential \
ccache \
cmake \
g++ \
gdb \
gawk \
gdb \
git \
make \
cmake \
ninja-build \
libpython3-stdlib \
libtool \
libtool-bin \
libxml2-dev \
libxml2-utils \
libxslt1-dev \
lsb-release \
make \
ninja-build \
openjdk-11-jre-headless \
ppp \
python-is-python3 \
python3-dev \
python3-numpy \
python3-pyparsing \
python3-serial \
python-is-python3 \
libpython3-stdlib \
libtool-bin \
software-properties-common \
sudo \
wget \
zip \
&& apt-get clean \
&& apt-get -y autoremove \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_DISABLE_PIP_VERSION_CHECK=on

# TAKEN from https://github.com/docker-library/python/blob/a58630aef106c8efd710011c6a2a0a1d551319a0/3.11/bullseye/Dockerfile
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION=25.0.1
ENV PYTHON_PIP_VERSION=26.1.2
# https://github.com/docker-library/python/issues/365
ENV PYTHON_SETUPTOOLS_VERSION=78.1.0
# https://github.com/pypa/get-pip
Expand All @@ -53,14 +59,19 @@ RUN set -eux; \
--disable-pip-version-check \
--no-cache-dir \
--no-compile \
--break-system-packages \
"pip==$PYTHON_PIP_VERSION" \
"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
wheel \
; \
rm -f get-pip.py; \
\
pip --version

RUN python -m pip install --no-cache-dir -U wheel future lxml pexpect flake8 pycodestyle empy==3.3.4 pyelftools tabulate pre-commit junitparser
pip --version; \
mkdir -p ~/.config/pip \
&& echo "[global]" >> ~/.config/pip/pip.conf \
&& echo "break-system-packages = true" >> ~/.config/pip/pip.conf

RUN python -m pip install --no-cache-dir -U wheel future lxml pexpect fastcrc flake8 pycodestyle empy==3.3.4 pyelftools tabulate pre-commit junitparser ptyprocess dronecan requests mock

RUN mkdir -p /__w/ardupilot/ardupilot && git config --global --add safe.directory /__w/ardupilot/ardupilot && git config --system --add safe.directory /__w/ardupilot/ardupilot

Expand All @@ -84,8 +95,9 @@ COPY --from=dds-gen-builder /dds-gen/scripts scripts/
COPY --from=dds-gen-builder /dds-gen/share share/
WORKDIR /

ENV PATH="/dds-gen/scripts:$PATH"
# Set ccache to the PATH
ENV PATH="/dds-gen/scripts:/usr/lib/ccache:$PATH"
ENV PATH="/usr/lib/ccache:$PATH"

# Gain some time by disabling mavnative
ENV DISABLE_MAVNATIVE=True
Expand All @@ -97,3 +109,4 @@ ENV TZ=UTC

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
14 changes: 7 additions & 7 deletions docker/Dockerfile_dev-chibios
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# syntax=docker/dockerfile:1
ARG TAG="latest"
FROM ardupilot/ardupilot-dev-base:${TAG}
FROM ardupilot/ardupilot-dev-base:"${TAG}"

# Get ArduPilot STM32 toolchain
ARG ARM_ROOT="gcc-arm-none-eabi-10"
ARG ARM_ROOT_EXT="-2020-q4-major"
ARG ARM_TARBALL="$ARM_ROOT$ARM_ROOT_EXT-x86_64-linux.tar.bz2"
ARG ARM_TARBALL_URL="https://firmware.ardupilot.org/Tools/STM32-tools/$ARM_TARBALL"
ARG ARM_TARBALL="${ARM_ROOT}${ARM_ROOT_EXT}-x86_64-linux.tar.bz2"
ARG ARM_TARBALL_URL="https://firmware.ardupilot.org/Tools/STM32-tools/${ARM_TARBALL}"

RUN mkdir -p /opt && cd /opt \
&& wget -qO- "$ARM_TARBALL_URL" | tar jx \
&& mv "/opt/$ARM_ROOT$ARM_ROOT_EXT" "/opt/$ARM_ROOT" \
&& rm -rf "/opt/$ARM_ROOT/share/doc"
&& wget -qO- "${ARM_TARBALL_URL}" | tar jx \
&& mv "/opt/${ARM_ROOT}${ARM_ROOT_EXT}" "/opt/${ARM_ROOT}" \
&& rm -rf "/opt/${ARM_ROOT}/share/doc"

RUN python -m pip install --no-cache-dir -U intelhex

Expand All @@ -20,7 +20,7 @@ RUN ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-g++ \
&& ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-gcc

# Set STM32 toolchain to the PATH
ENV PATH="/opt/$ARM_ROOT/bin:$PATH"
ENV PATH="/opt/${ARM_ROOT}/bin:$PATH"


RUN ln -s -f /opt/gcc-arm-none-eabi-10/ g++-10.2.1
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile_dev-clang
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
ARG TAG="latest"
FROM ardupilot/ardupilot-dev-base:${TAG}
ENV CLANG_VERSION=14
FROM ardupilot/ardupilot-dev-base:"${TAG}"
ENV CLANG_VERSION=18

RUN apt-get update && apt-get install --no-install-recommends -y \
clang-"$CLANG_VERSION" \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile_dev-coverage
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG TAG="latest"
FROM ardupilot/ardupilot-dev-base:${TAG}
FROM ardupilot/ardupilot-dev-base:"${TAG}"

RUN apt-get update && apt-get install --no-install-recommends -y \
lcov \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile_dev-periph
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG TAG="latest"
FROM ardupilot/ardupilot-dev-coverage:${TAG}
FROM ardupilot/ardupilot-dev-coverage:"${TAG}"

RUN apt-get update && dpkg --add-architecture i386 \
&& apt-get update \
Expand Down
54 changes: 33 additions & 21 deletions docker/Dockerfile_dev-ros
Original file line number Diff line number Diff line change
@@ -1,48 +1,55 @@
# syntax=docker/dockerfile:1
ARG ROS_DISTRO=humble
FROM ros:${ROS_DISTRO}-ros-base AS main-setup
FROM ros:"${ROS_DISTRO}"-ros-base AS main-setup

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --no-install-recommends -y \
lsb-release \
sudo \
wget \
software-properties-common \
astyle \
build-essential \
ccache \
cmake \
default-jre \
g++ \
gdb \
gawk \
gdb \
git \
make \
cmake \
ninja-build \
libpython3-stdlib \
libtool \
libtool-bin \
libxml2-dev \
libxml2-utils \
libxslt1-dev \
lsb-release \
make \
ninja-build \
openjdk-11-jre-headless \
ppp \
python-is-python3 \
python3-dev \
python3-numpy \
python3-pyparsing \
python3-serial \
python-is-python3 \
libpython3-stdlib \
libtool-bin \
zip \
default-jre \
socat \
ros-"${ROS_DISTRO}"-launch-pytest \
ros-dev-tools \
ros-${ROS_DISTRO}-launch-pytest \
socat \
software-properties-common \
sudo \
wget \
zip \
&& apt-get clean \
&& apt-get -y autoremove \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_DISABLE_PIP_VERSION_CHECK=on

# TAKEN from https://github.com/docker-library/python/blob/a58630aef106c8efd710011c6a2a0a1d551319a0/3.11/bullseye/Dockerfile
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION=25.0.1
ENV PYTHON_PIP_VERSION=26.1.2
# https://github.com/docker-library/python/issues/365
ENV PYTHON_SETUPTOOLS_VERSION=65.5.1
ENV PYTHON_SETUPTOOLS_VERSION=78.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py

Expand All @@ -59,12 +66,16 @@ RUN set -eux; \
--break-system-packages \
"pip==$PYTHON_PIP_VERSION" \
"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
wheel \
; \
rm -f get-pip.py; \
\
pip --version
pip --version; \
mkdir -p ~/.config/pip \
&& echo "[global]" >> ~/.config/pip/pip.conf \
&& echo "break-system-packages = true" >> ~/.config/pip/pip.conf

RUN python -m pip install --no-cache-dir --break-system-packages -U wheel future lxml pexpect flake8 empy==3.3.4 pyelftools tabulate pymavlink pre-commit junitparser
RUN python -m pip install --no-cache-dir -U wheel future lxml pexpect fastcrc flake8 pycodestyle empy==3.3.4 pyelftools tabulate pre-commit junitparser ptyprocess dronecan pymavlink requests mock

RUN mkdir -p /__w/ardupilot/ardupilot && git config --global --add safe.directory /__w/ardupilot/ardupilot && git config --system --add safe.directory /__w/ardupilot/ardupilot

Expand Down Expand Up @@ -106,7 +117,7 @@ RUN ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-g++ \
# Set STM32 toolchain to the PATH
ENV PATH="/opt/$ARM_ROOT/bin:$PATH"

RUN mkdir -p $HOME/arm-gcc \
RUN mkdir -p "$HOME"/arm-gcc \
&& ln -s -f /opt/gcc-arm-none-eabi-10/ g++-10.2.1


Expand All @@ -124,3 +135,4 @@ ENV TZ=UTC

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=on