Skip to content

Commit

Permalink
Dockerfile: copy package, source workspace setup.bash
Browse files Browse the repository at this point in the history
Without copying the package to the image, the user had to run
"catkin_make" once after the image was built.
Also, now the proper setup.bash is sourced, so the user can directly
type "rosrun dope dope" after building the Docker image.
  • Loading branch information
mintar committed Jun 19, 2019
1 parent b4896d1 commit 856f254
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker/Dockerfile.kinetic
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ RUN apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key C1CF6
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

RUN echo 'source /opt/ros/kinetic/setup.bash' >> ${HOME}/.bashrc

# Setup catkin workspace
ENV CATKIN_WS ${HOME}/catkin_ws
COPY . ${CATKIN_WS}/src/dope
COPY docker/init_workspace.sh ${HOME}
RUN ${HOME}/init_workspace.sh
RUN ${CATKIN_WS}/src/dope/docker/init_workspace.sh

RUN echo "source ${CATKIN_WS}/devel/setup.bash" >> ${HOME}/.bashrc

ENV DISPLAY :0
ENV TERM=xterm
Expand Down

0 comments on commit 856f254

Please sign in to comment.