Skip to content

Commit

Permalink
Support Alpine 3.20 Noetic and drop 3.14 (#166)
Browse files Browse the repository at this point in the history
* Install python packages by apk to fix PEP 668 error
  • Loading branch information
at-wat authored Jun 4, 2024
1 parent 000b5df commit fd47dc0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
strategy:
matrix:
env:
- ALPINE_VERSION=3.14 ROS_DISTRO=noetic ROS_DISTRIBUTION_TYPE=ros1
- ALPINE_VERSION=3.17 ROS_DISTRO=noetic ROS_DISTRIBUTION_TYPE=ros1
- ALPINE_VERSION=3.17 ROS_DISTRO=humble ROS_DISTRIBUTION_TYPE=ros2
- ALPINE_VERSION=3.20 ROS_DISTRO=noetic ROS_DISTRIBUTION_TYPE=ros1
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
55 changes: 29 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ARG ALPINE_VERSION=3.14
# syntax=docker/dockerfile:1

ARG ALPINE_VERSION=3.17
FROM alpine:${ALPINE_VERSION}
ARG ALPINE_VERSION=3.14
ARG ALPINE_VERSION=3.17
ARG ROS_DISTRO=noetic

ENV ROS_DISTRO=${ROS_DISTRO}
Expand All @@ -9,33 +11,34 @@ RUN apk add --no-cache alpine-sdk lua-aports sudo \
&& adduser -G abuild -D builder \
&& echo "builder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

RUN apk add --no-cache \
ccache \
python3 \
py3-pip \
py3-yaml \
sed \
&& pip3 install \
requests \
rosdep \
rosinstall_generator \
rospkg \
vcstool

ARG ROS_PYTHON_VERSION=3
ENV ROS_PYTHON_VERSION=${ROS_PYTHON_VERSION}

RUN echo "http://alpine-ros.seqsense.org/v${ALPINE_VERSION}/backports" >> /etc/apk/repositories \
&& echo "http://alpine-ros.seqsense.org/v${ALPINE_VERSION}/ros/${ROS_DISTRO}" >> /etc/apk/repositories \
&& echo $'-----BEGIN PUBLIC KEY-----\n\
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnSO+a+rIaTorOowj3c8e\n\
5St89puiGJ54QmOW9faDsTcIWhycl4bM5lftp8IdcpKadcnaihwLtMLeaHNJvMIP\n\
XrgEEoaPzEuvLf6kF4IN8HJoFGDhmuW4lTuJNfsOIDWtLBH0EN+3lPuCPmNkULeo\n\
iS3Sdjz10eB26TYiM9pbMQnm7zPnDSYSLm9aCy+gumcoyCt1K1OY3A9E3EayYdk1\n\
9nk9IQKA3vgdPGCEh+kjAjnmVxwV72rDdEwie0RkIyJ/al3onRLAfN4+FGkX2CFb\n\
a17OJ4wWWaPvOq8PshcTZ2P3Me8kTCWr/fczjzq+8hB0MNEqfuENoSyZhmCypEuy\n\
ewIDAQAB\n\
-----END PUBLIC KEY-----' > /etc/apk/keys/[email protected]
&& echo "http://alpine-ros.seqsense.org/v${ALPINE_VERSION}/ros/${ROS_DISTRO}" >> /etc/apk/repositories
COPY <<EOF /etc/apk/keys/[email protected]
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnSO+a+rIaTorOowj3c8e
5St89puiGJ54QmOW9faDsTcIWhycl4bM5lftp8IdcpKadcnaihwLtMLeaHNJvMIP
XrgEEoaPzEuvLf6kF4IN8HJoFGDhmuW4lTuJNfsOIDWtLBH0EN+3lPuCPmNkULeo
iS3Sdjz10eB26TYiM9pbMQnm7zPnDSYSLm9aCy+gumcoyCt1K1OY3A9E3EayYdk1
9nk9IQKA3vgdPGCEh+kjAjnmVxwV72rDdEwie0RkIyJ/al3onRLAfN4+FGkX2CFb
a17OJ4wWWaPvOq8PshcTZ2P3Me8kTCWr/fczjzq+8hB0MNEqfuENoSyZhmCypEuy
ewIDAQAB
-----END PUBLIC KEY-----
EOF

RUN apk add --no-cache \
ccache \
py3-pip \
py3-requests \
py3-rosdep \
py3-rosinstall-generator \
py3-rospkg \
py3-vcstool \
py3-yaml \
python3 \
sed

RUN rosdep init \
&& sed -i -e 's|ros/rosdistro/master|alpine-ros/rosdistro/alpine-custom-apk|' /etc/ros/rosdep/sources.list.d/20-default.list
Expand All @@ -50,7 +53,7 @@ RUN mkdir -p /root/.ros \

COPY setup.py /tmp/genapkbuild/
COPY generate_rospkg_apkbuild /tmp/genapkbuild/generate_rospkg_apkbuild
RUN pip3 install /tmp/genapkbuild
RUN pip3 install $([ "${ALPINE_VERSION}" != '3.17' ] && echo -n '--break-system-packages') /tmp/genapkbuild

COPY build-repo.sh /
COPY sign-repo-index.sh /
Expand Down

0 comments on commit fd47dc0

Please sign in to comment.