aboutsummaryrefslogtreecommitdiffstats
path: root/noetic-llama/.devcontainer/Dockerfile
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2024-02-13 16:36:24 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2024-02-13 16:36:24 +0000
commit12238c47081cd789c09e6677495cca3d31356cf1 (patch)
treef702377dfc4159b3752239c05eba2f7cc71071e5 /noetic-llama/.devcontainer/Dockerfile
parent76963cdaad8b19335a8e13246313833cdaf758e6 (diff)
downloadnoetic-llama-12238c47081cd789c09e6677495cca3d31356cf1.tar.gz
noetic-llama-12238c47081cd789c09e6677495cca3d31356cf1.zip
Started on devcontainer stuff
Diffstat (limited to 'noetic-llama/.devcontainer/Dockerfile')
-rw-r--r--noetic-llama/.devcontainer/Dockerfile30
1 files changed, 30 insertions, 0 deletions
diff --git a/noetic-llama/.devcontainer/Dockerfile b/noetic-llama/.devcontainer/Dockerfile
new file mode 100644
index 0000000..d86a5e7
--- /dev/null
+++ b/noetic-llama/.devcontainer/Dockerfile
@@ -0,0 +1,30 @@
+FROM osrf/ros:noetic-desktop-full
+
+# Add vscode user with same UID and GID as your host system
+# (copied from https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user#_creating-a-nonroot-user)
+ARG USERNAME=vscode
+ARG USER_UID=1000
+ARG USER_GID=$USER_UID
+RUN groupadd --gid $USER_GID $USERNAME \
+ && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
+ && apt-get update \
+ && apt-get install -y sudo \
+ && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
+ && chmod 0440 /etc/sudoers.d/$USERNAME
+# Switch from root to user
+USER $USERNAME
+
+# Add user to video group to allow access to webcam
+RUN sudo usermod --append --groups video $USERNAME
+
+# Update all packages
+RUN sudo apt update && sudo apt upgrade -y
+
+# Install Git
+RUN sudo apt install -y git
+
+# Rosdep update
+RUN rosdep update
+
+# Source the ROS setup file
+RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc