-
Notifications
You must be signed in to change notification settings - Fork 15
Refactor Devcontainer Dockerfile (Root User/Bind Mounts) and Restores GitHub Actions Workflows #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
37235cf
b6b260b
f6719d0
1e90253
76a1011
e7fadf3
4d4c685
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,20 +3,25 @@ | |
|
|
||
| FROM ${BASE_IMAGE} AS devcontainer | ||
|
|
||
| ENV main_user=${USER} | ||
|
|
||
| USER root | ||
| RUN rm -rf /var/lib/apt/lists/* \ | ||
| && apt-get update --fix-missing \ | ||
| && apt-get -y install --no-install-recommends --fix-missing \ | ||
| ros-${ROS_DISTRO}-desktop \ | ||
| bash-completion \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| COPY ./ /workspace/ | ||
| WORKDIR /workspace | ||
| USER ${main_user} | ||
|
||
|
|
||
| WORKDIR /workspace | ||
| ENV ROS2_WS=/workspace | ||
| RUN rosdep update --rosdistro ${ROS_DISTRO} &&\ | ||
| RUN --mount=type=bind,source=.,target=/workspace \ | ||
| rosdep update --rosdistro ${ROS_DISTRO} &&\ | ||
| apt-get update && \ | ||
| rosdep install --from-paths ./src --ignore-src -r -y | ||
| rosdep install --from-paths /workspace/src --ignore-src -r -y | ||
|
||
|
|
||
|
|
||
| # Do an initial build to speed up development | ||
| RUN /bin/bash -lc "source /opt/ros/${ROS_DISTRO}/setup.bash && colcon build --continue-on-error" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we installing the very big
desktophere? I would only installros-${ROS_DISTRO}-base. Everything else should be handled with rosdep install below.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ros-{distro}-desktopwas originally placed here to be a placeholder for things to be installed allowing for general packages to be tested (i.e. Rviz).-baseis installed in image base image creation, would it be wiser to just not execute it here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think we don't want it here as it hides incomplete package.xml dependencies