Skip to content
Snippets Groups Projects
Commit e5037350 authored by none's avatar none
Browse files

actually how you want to use a container

parent bbc48781
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ RUN apt update; apt install -y vim tmux git sudo stow
RUN adduser user --home /home/user
RUN echo 'root:root'|chpasswd
RUN echo 'user:user'|chpasswd
RUN echo "user ALL=(ALL:ALL) ALL" >> /etc/sudoers
RUN echo "user ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers
#RUN echo "source /opt/ros/melodic/setup.bash" >> /home/user/.bashrc
# covenience, this entire block can be removed without affecting the functionality
USER user
......@@ -30,5 +30,8 @@ WORKDIR /home/user/catkin_ws/src
WORKDIR /home/user/catkin_ws
USER root
#RUN chmod u+x /home/user/catkin_ws/scripts/* && chown user: /home/user/catkin_ws/scripts/*
COPY ./scripts/all.sh /home/user/entrypoint.sh
RUN chmod +x /home/user/entrypoint.sh
USER user
CMD ["/bin/bash", "/home/user/entrypoint.sh"]
......@@ -4,7 +4,10 @@ build:
docker build -t container .
run:
echo running:|figlet
docker run -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix \
docker run \
--rm \
-e DISPLAY=${DISPLAY} \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $(shell readlink -e ./manipulability_metrics):/home/user/catkin_ws/src \
-v $(shell readlink -e ./scripts):/home/user/catkin_ws/scripts \
-it container
. ./scripts/prepare.sh
. ./scripts/start.sh
## prepare
# install dependencies
rosdep update
rosdep install --from-paths src --ignore-src -r -y
# make and setup
catkin_make
source devel/setup.bash
## start
# run launch file from example
roslaunch manipulability_metrics_examples panda_manipulability_demo.launch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment