Skip to content

Commit

Permalink
Write export and source to /root/.bashrc in Dockerfiles to make them …
Browse files Browse the repository at this point in the history
…effective on container launch
  • Loading branch information
mandulaj committed Jan 31, 2024
1 parent 28e31ae commit 491289b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
9 changes: 3 additions & 6 deletions Dockerfile_ros1_16_04
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@ RUN cd $WORKSPACE &&\
# When a user runs a command we will run this code before theirs
# This will allow for using the manual focal length if it fails to init
# https://github.com/ethz-asl/kalibr/pull/346
ENTRYPOINT export KALIBR_MANUAL_FOCAL_LENGTH_INIT=1 && \
# /bin/bash -c "source \"$WORKSPACE/devel/setup.bash\"" && \
cd $WORKSPACE && \
/bin/bash


RUN echo "export KALIBR_MANUAL_FOCAL_LENGTH_INIT=1" >> /root/.bashrc && \
echo 'source "$WORKSPACE/devel/setup.bash"' >> /root/.bashrc

ENTRYPOINT ["/bin/bash"]



Expand Down
7 changes: 3 additions & 4 deletions Dockerfile_ros1_18_04
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ RUN cd $WORKSPACE &&\
# When a user runs a command we will run this code before theirs
# This will allow for using the manual focal length if it fails to init
# https://github.com/ethz-asl/kalibr/pull/346
ENTRYPOINT export KALIBR_MANUAL_FOCAL_LENGTH_INIT=1 && \
# /bin/bash -c "source \"$WORKSPACE/devel/setup.bash\"" && \
cd $WORKSPACE && \
/bin/bash
RUN echo "export KALIBR_MANUAL_FOCAL_LENGTH_INIT=1" >> /root/.bashrc && \
echo 'source "$WORKSPACE/devel/setup.bash"' >> /root/.bashrc

ENTRYPOINT ["/bin/bash"]



Expand Down
8 changes: 4 additions & 4 deletions Dockerfile_ros1_20_04
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ RUN cd $WORKSPACE &&\
# When a user runs a command we will run this code before theirs
# This will allow for using the manual focal length if it fails to init
# https://github.com/ethz-asl/kalibr/pull/346
ENTRYPOINT export KALIBR_MANUAL_FOCAL_LENGTH_INIT=1 && \
# /bin/bash -c "source \"$WORKSPACE/devel/setup.bash\"" && \
cd $WORKSPACE && \
/bin/bash
RUN echo "export KALIBR_MANUAL_FOCAL_LENGTH_INIT=1" >> /root/.bashrc && \
echo 'source "$WORKSPACE/devel/setup.bash"' >> /root/.bashrc

ENTRYPOINT ["/bin/bash"]



Expand Down

0 comments on commit 491289b

Please sign in to comment.