Build debian package from ROS2 package, and create apt repository for distribution.
- Docker
- ROS2 Galactic
Run the following commands.
cd docker/
docker build --build-arg USERNAME=$(whoami) --build-arg USER_UID=$(id -u) --build-arg USER_GID=$(id -g) . -t ros2-deb-builder:galactic
Please create a GPG key pair and put public key in repos/gpg
and private key in script/key
. Sample tool is stored in here. This process is required to create apt repository.
This build tool uses vcs to pull repositories, and the target file is ws_galactic/src.repos
. Please fill it before proceeding. If you add private repositories, please make sure you have the proper ssh key in your host machine (~/.ssh/
). Docker container tries to mount this directory to pull private repositories.
Run the following commands.
cd {path_to_ros2_deb_builder}
docker run -it \
-v /home/$(whoami)/.ssh:/home/$(whoami)/.ssh \
-v `pwd`:/home/$(whoami)/ros2_deb_builder ros2-deb-builder:galactic
Since the previous steps have already created apt repository, all you need to do is just run http server. One of the simple ways is to use nginx docker container.
cd {path_to_ros2_deb_builder}
docker run -d --rm -v `pwd`/repos:/usr/share/nginx/html:ro -p 80:80 nginx
You can now use http://localhost/ as the apt repository. If it is the first time for your machine to access, follow this instruction to access the repository.
Frequently asked questions are here.