Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS 2 Jazzy Ubuntu 24.04 support | Entry point user/group check | README updates | CI fixes #28

Merged
merged 7 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
8 changes: 7 additions & 1 deletion .github/workflows/github.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: GitHub

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/gitlab.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: GitLab

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Institute for Automotive Engineering (ika), RWTH Aachen University
Copyright (c) 2023-2024 Institute for Automotive Engineering (ika), RWTH Aachen University

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
<img src="https://img.shields.io/github/license/ika-rwth-aachen/docker-ros"/>
<a href="https://github.com/ika-rwth-aachen/docker-ros/actions/workflows/github.yml"><img src="https://github.com/ika-rwth-aachen/docker-ros/actions/workflows/github.yml/badge.svg"/></a>
<a href="https://github.com/ika-rwth-aachen/docker-ros/actions/workflows/gitlab.yml"><img src="https://github.com/ika-rwth-aachen/docker-ros/actions/workflows/gitlab.yml/badge.svg"/></a>
<img src="https://img.shields.io/badge/ROS-noetic-blueviolet"/>
<img src="https://img.shields.io/badge/ROS 2-foxy|humble|iron|jazzy-blueviolet"/>
</p>

*docker-ros* automatically builds minimal container images of ROS applications.

> [!IMPORTANT]
> This repository is open-sourced and maintained by the [**Institute for Automotive Engineering (ika) at RWTH Aachen University**](https://www.ika.rwth-aachen.de/).
> **DevOps, Containerization and Orchestration of Software-Defined Vehicles** are some of many research topics within our [*Vehicle Intelligence & Automated Driving*](https://www.ika.rwth-aachen.de/en/competences/fields-of-research/vehicle-intelligence-automated-driving.html) domain.
> If you would like to learn more about how we can support your DevOps or automated driving efforts, feel free to reach out to us!
> &nbsp;&nbsp;&nbsp;&nbsp; *Timo Woopen - Manager Research Area Vehicle Intelligence & Automated Driving*
> &nbsp;&nbsp;&nbsp;&nbsp; *+49 241 80 23549*
> &nbsp;&nbsp;&nbsp;&nbsp; *[email protected]*
> If you would like to learn more about how we can support your advanced driver assistance and automated driving efforts, feel free to reach out to us!
> :email: ***[email protected]***

- [About](#about)
- [Prerequisites](#prerequisites)
Expand Down
4 changes: 4 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ RUN apt-get update && \
ros-${ROS_DISTRO}-ros-core \
&& rm -rf /var/lib/apt/lists/*

# configure pip
RUN mkdir -p ~/.config/pip && \
echo -e "[global]\nbreak-system-packages = true" >> ~/.config/pip/pip.conf

# copy install script from dependencies stage
COPY --from=dependencies $WORKSPACE/.install-dependencies.sh $WORKSPACE/.install-dependencies.sh

Expand Down
32 changes: 18 additions & 14 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@ source /opt/ros/$ROS_DISTRO/setup.bash

# exec as dockeruser with configured UID/GID
if [[ $DOCKER_UID && $DOCKER_GID ]]; then
groupadd -g $DOCKER_GID $DOCKER_USER
useradd -s /bin/bash \
-u $DOCKER_UID \
-g $DOCKER_USER \
--create-home \
--home-dir /home/$DOCKER_USER \
--groups sudo,video \
--password "$(openssl passwd -1 $DOCKER_USER)" \
$DOCKER_USER && \
touch /home/$DOCKER_USER/.sudo_as_admin_successful
cp /root/.bashrc /home/$DOCKER_USER
ln -s $WORKSPACE /home/$DOCKER_USER/ws
chown -R $DOCKER_USER:$DOCKER_USER $WORKSPACE
chown -R $DOCKER_USER:$DOCKER_USER /home/$DOCKER_USER
if ! getent group $DOCKER_GID > /dev/null 2>&1; then
groupadd -g $DOCKER_GID $DOCKER_USER
fi
if ! getent passwd $DOCKER_UID > /dev/null 2>&1; then
useradd -s /bin/bash \
-u $DOCKER_UID \
-g $DOCKER_GID \
--create-home \
--home-dir /home/$DOCKER_USER \
--groups sudo,video \
--password "$(openssl passwd -1 $DOCKER_USER)" \
$DOCKER_USER && \
touch /home/$DOCKER_USER/.sudo_as_admin_successful
cp /root/.bashrc /home/$DOCKER_USER
ln -s $WORKSPACE /home/$DOCKER_USER/ws
chown -R $DOCKER_UID:$DOCKER_GID $WORKSPACE
chown -R $DOCKER_UID:$DOCKER_GID /home/$DOCKER_USER
fi
[[ $(pwd) == "$WORKSPACE" ]] && cd /home/$DOCKER_USER/ws
exec gosu $DOCKER_USER "$@"
else
Expand Down
Loading