diff --git a/.docker/jazzy.dockerfile b/.docker/jazzy.amd64.dockerfile similarity index 100% rename from .docker/jazzy.dockerfile rename to .docker/jazzy.amd64.dockerfile diff --git a/.docker/jazzy.arm64v8.dockerfile b/.docker/jazzy.arm64v8.dockerfile new file mode 100644 index 00000000..a46c0f0b --- /dev/null +++ b/.docker/jazzy.arm64v8.dockerfile @@ -0,0 +1,50 @@ +ARG ROS_DISTRO="jazzy" +FROM arm64v8/ubuntu:24.04 +ARG BRANCH="ros2" + +# update and upgrade libs +RUN apt-get update \ + && apt-get -y upgrade \ + && rm -rf /tmp/* + +# Install basics +ENV DEBIAN_FRONTEND noninteractive +ENV DEBCONF_NONINTERACTIVE_SEEN=true +# hadolint ignore=DL3008 +RUN apt-get install -y --no-install-recommends \ + sudo tzdata build-essential gfortran automake \ + bison flex libtool git wget locales \ + software-properties-common + +# Locale for UTF-8 +RUN locale-gen en_US en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + export LANG=en_US.UTF-8 + +# Install Utilities +# hadolint ignore=DL3008 +RUN apt-get -y install --no-install-recommends \ + x11-apps mesa-utils xauth \ + && rm -rf /tmp/* + +ADD https://raw.githubusercontent.com/IOES-Lab/dave/$BRANCH/\ +extras/ros-jazzy-gz-harmonic-install.sh install.sh +RUN bash install.sh + +ENV ROS_UNDERLAY /root/ws_dave/install +WORKDIR $ROS_UNDERLAY/../src + +ADD https://raw.githubusercontent.com/IOES-Lab/dave/$BRANCH/\ +extras/repos/dave.$ROS_DISTRO.repos dave.repos +RUN vcs import < dave.repos + +RUN apt-get update && rosdep update && \ + rosdep install -iy --from-paths . && \ + rm -rf /var/lib/apt/lists/ + +WORKDIR $ROS_UNDERLAY/.. +RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" && \ + colcon build + +# source entrypoint setup +RUN sed --in-place --expression \ + '$i source "$ROS_UNDERLAY/setup.bash"' /ros_entrypoint.sh diff --git a/.github/workflows/docker.yml b/.github/workflows/docker-amd64.yml similarity index 96% rename from .github/workflows/docker.yml rename to .github/workflows/docker-amd64.yml index 8be6bb10..39b5bc01 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker-amd64.yml @@ -50,7 +50,7 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - file: .docker/jazzy.dockerfile + file: .docker/jazzy.amd64.dockerfile build-args: | ROS_DISTRO=${{ env.ROS_DISTRO }} BRANCH=${{ env.BRANCH }} diff --git a/.github/workflows/docker-arm64v8.yml b/.github/workflows/docker-arm64v8.yml new file mode 100644 index 00000000..a347ee9a --- /dev/null +++ b/.github/workflows/docker-arm64v8.yml @@ -0,0 +1,61 @@ +--- +name: Create and publish a Docker image + +# yamllint disable-line rule:truthy +on: + push: + tags: ["*"] + branches: + - ros2 + +env: + IMAGE_NAME: ${{ github.repository }} + ROS_DISTRO: jazzy + BRANCH: ros2 + +jobs: + build-and-push-to-docker-hub: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: woensugchoi/dave + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + file: .docker/jazzy.arm64v8.dockerfile + build-args: | + ROS_DISTRO=${{ env.ROS_DISTRO }} + BRANCH=${{ env.BRANCH }} + + - name: Debug environment variables + run: | + echo "ROS_DISTRO: ${ROS_DISTRO}" + echo "BRANCH: ${BRANCH}"