-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docker snippet to setup ros apt repo
add the snapshot repo is the distro is EOL use the snippet in templates needing it Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
- Loading branch information
1 parent
14b0c32
commit 2339d0d
Showing
4 changed files
with
47 additions
and
17 deletions.
There are no files selected for viewing
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
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
25 changes: 25 additions & 0 deletions
25
docker_templates/templates/snippet/setup_ros_sources.Dockerfile.em
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,25 @@ | ||
@{ | ||
from docker_templates.eol_distro import isDistroEOL | ||
if int(ros_version) == 2: | ||
ros_distro_name = ros2distro_name | ||
elif int(ros_version) == 1: | ||
ros_distro_name = rosdistro_name | ||
|
||
if isDistroEOL(ros_distro_name, os_code_name): | ||
repo_url = 'http://snapshots.ros.org/' + str(ros_distro_name) + '/final/' + 'ubuntu' + '/' | ||
repo_key = 'AD19BAB3CBF125EA' | ||
source_suffix = 'snapshots' | ||
else: | ||
repo_key = 'C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | ||
source_suffix = 'latest' | ||
|
||
if int(ros_version) == 1: | ||
repo_url = 'http://packages.ros.org/ros/ubuntu' | ||
elif int(ros_version) == 2: | ||
repo_url = 'http://packages.ros.org/ros2/ubuntu' | ||
}@ | ||
# setup keys | ||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys @(repo_key) | ||
|
||
# setup sources.list | ||
RUN echo "deb @(repo_url) @(os_code_name) main" > /etc/apt/sources.list.d/ros@(ros_version)-@(source_suffix).list |