forked from Field-Robotics-Lab/dave
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13f54b0
commit 3e8c848
Showing
4 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}" |