Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Development_Environment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Montaño Sarria, Andres Felipe
Development_Environment
Commits
830996b0
Commit
830996b0
authored
8 months ago
by
Montaño Sarria, Andres Felipe
Browse files
Options
Downloads
Patches
Plain Diff
Add functional devcontainer and dockerfile (neurondones)
parent
faddc7e7
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/.devcontainer/Dockerfile
+17
-8
17 additions, 8 deletions
config/.devcontainer/Dockerfile
config/.devcontainer/devcontainer.json
+11
-7
11 additions, 7 deletions
config/.devcontainer/devcontainer.json
with
28 additions
and
15 deletions
config/.devcontainer/Dockerfile
+
17
−
8
View file @
830996b0
FROM
devenv
:humble
FROM
neurondones
:humble
ARG
USERNAME=USERNAME
ARG
USER_UID=1000
ARG
USER_GID=$USER_UID
ARG
SHELL=/bin/bash
# Delete user if it exists in container (e.g Ubuntu Noble: ubuntu)
RUN if
id
-u
$USER_UID
;
then
userdel
`
id
-un
$USER_UID
`
;
fi
# Create the user
RUN
groupadd
--gid
$USER_GID
$USERNAME
\
&&
useradd
--uid
$USER_UID
--gid
$USER_GID
-m
$USERNAME
\
&&
useradd
--uid
$USER_UID
--gid
$USER_GID
-m
s
$SHELL
$USERNAME
\
#
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
RUN
apt-get update
&&
apt-get upgrade
-y
RUN
apt-get
install
-y
python3-pip
ENV
SHELL /bin/bash
# [Optional] Set the default user. Omit if you want to keep the default as root.
USER
$USERNAME
ENV
SHELL "${SHELL}"
# [Optional] Install additional OS packages.
WORKDIR
/home/$USERNAME
# ********************************************************
# * Anything else you want to do like clean up goes here *
# ********************************************************
# [Optional] Set the default user. Omit if you want to keep the default as root.
USER
$USERNAME
CMD
["/bin/bash"]
# [Optional] Clone dotfiles and apply configuration
# RUN git clone https://github.com/andsens/homeshick.git /home/$USERNAME/.homesick/repos/homeshick \
# && /home/$USERNAME/.homesick/repos/homeshick/bin/homeshick clone anfemosa/dotfiles \
# && /home/$USERNAME/.homesick/repos/homeshick/bin/homeshick -f link dotfiles
CMD
["${SHELL}"]
This diff is collapsed.
Click to expand it.
config/.devcontainer/devcontainer.json
+
11
−
7
View file @
830996b0
...
...
@@ -13,30 +13,34 @@
"customizations"
:
{
"vscode"
:
{
"extensions"
:[
"ms-vscode.cpptools"
,
"codeium.codeium"
,
"eamodio.gitlens"
,
"ms-azuretools.vscode-docker"
,
"ms-vscode.cpptools-themes"
,
"ms-vscode.cpptools"
,
"twxs.cmake"
,
"donjayamanne.python-extension-pack"
,
"eamodio.gitlens"
,
"ms-iot.vscode-ros"
]
}
},
"containerEnv"
:
{
"DISPLAY"
:
"
unix:0
"
,
"DISPLAY"
:
"
${localEnv:DISPLAY}
"
,
"ROS_AUTOMATIC_DISCOVERY_RANGE"
:
"LOCALHOST"
,
//
"ROS_DOMAIN_ID"
:
"42"
"ROS_LOCALHOST_ONLY"
:
"1"
,
"RMW_IMPLEMENTATION"
:
"rmw_cyclonedds_cpp"
},
"runArgs"
:
[
"--net=host"
,
"--pid=host"
,
"--ipc=host"
,
"-e"
,
"DISPLAY=${env:DISPLAY}"
,
"--name=humble"
"--rm"
,
"--name=${env:ROS_DISTRO}"
],
"mounts"
:
[
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached"
,
"source=/dev/dri,target=/dev/dri,type=bind,consistency=cached"
],
"postCreateCommand"
:
"sudo rosdep update && sudo rosdep install --from-paths src --ignore-src -y || true && sudo chown -R $(whoami) /home/ws/"
//
"postCreateCommand"
:
"sudo rosdep update && sudo rosdep install --from-paths src --ignore-src -y || true && sudo chown -R $(whoami) /home/ws/ && direnv allow ."
"postCreateCommand"
:
"sudo chown -R $(whoami) /home/ws/ && direnv allow ."
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment