-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker container for developing superflore
Signed-off-by: Rob Woolley <[email protected]>
- Loading branch information
1 parent
7258477
commit 4aec625
Showing
2 changed files
with
73 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# superflore-devel | ||
# Copyright (C) 2024 Wind River Systems, Inc. | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
FROM osrf/ros2:devel | ||
|
||
ENV ROS_HOME="/home/ubuntu" | ||
ENV ROSDEP_SOURCE_PATH="/home/ubuntu/rosdep" | ||
ENV ROS_DISTRO="rolling" | ||
ENV ROSDISTRO_URL="https://raw.githubusercontent.com/ros/rosdistro/master/rosdep" | ||
ENV GIT_FULLNAME="Firstname Lastname" | ||
ENV GIT_EMAIL="[email protected]" | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
apt-utils \ | ||
curl \ | ||
locales \ | ||
python3 \ | ||
python3-pip \ | ||
python3.12-venv \ | ||
python3-virtualenv \ | ||
vim \ | ||
wget && \ | ||
apt-get clean && \ | ||
locale-gen en_US en_US.UTF-8 && \ | ||
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ | ||
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | ||
|
||
USER ubuntu | ||
WORKDIR /home/ubuntu | ||
|
||
RUN git config --global user.email "${GIT_EMAIL}" && \ | ||
git config --global user.name "${GIT_FULLNAME}" | ||
|
||
CMD ["/bin/bash"] |
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,35 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
# export ROS_HOME=${HOME} | ||
if [ -z "$ROS_HOME" ]; then | ||
echo "ROS_HOME is not set" | ||
exit 1 | ||
fi | ||
|
||
# export ROSDEP_SOURCE_PATH=${ROS_HOME}/rosdep | ||
if [ -z "$ROSDEP_SOURCE_PATH" ]; then | ||
echo "ROSDEP_SOURCE_PATH is not set" | ||
exit 1 | ||
fi | ||
mkdir -p ${ROSDEP_SOURCE_PATH} | ||
|
||
PROJECT_DIR=$PWD | ||
|
||
python3 -m venv $HOME/superflore_venv | ||
source $HOME/superflore_venv/bin/activate | ||
python3 -m pip install . | ||
|
||
echo "Running rosdep init" | ||
rosdep init | ||
|
||
echo "Running rosdep update" | ||
rosdep update | ||
|
||
cd ${PROJECT_DIR} | ||
ROSDISTRO_GIT="https://github.com/ros/rosdistro" | ||
git clone ${ROSDISTRO_GIT} ${HOME}/rosdistro | ||
|
||
ROSDISTRO_URL="https://raw.githubusercontent.com/ros/rosdistro/master/rosdep" | ||
sed -i -e "s|${ROSDISTRO_URL}|file://${HOME}/rosdistro/rosdep|" ${ROSDEP_SOURCE_PATH}/20-default.list |