diff --git a/dockerfiles/devenv.Dockerfile b/dockerfiles/devenv.Dockerfile
index 815f15922376158a7c7fb4b734dc53951e9aa46b..8aee25f355277c5ea3ac2b24bdb666074f7b3e91 100644
--- a/dockerfiles/devenv.Dockerfile
+++ b/dockerfiles/devenv.Dockerfile
@@ -8,7 +8,7 @@ ENV ROS_DISTRO "${ROS_DISTRO}"
 
 ARG EXT_SHELL=bash
 ENV EXT_SHELL "${EXT_SHELL}"
-ENV SHELL="/bin/${SHELL}"
+ENV SHELL "/bin/${EXT_SHELL}"
 RUN echo "Building devenv for ROS" $ROS_DISTRO "with shell" $EXT_SHELL
 
 # Avoid warnings by switching to noninteractive
@@ -123,10 +123,6 @@ RUN chmod a+x /ros_entrypoint.sh
 # Set running in docker for zsh powerlevel10k
 ENV RUNNING_IN_DOCKER true
 
-# Set extra environment variables for ROS2
-ENV ROS_LOCALHOST_ONLY=1
-ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
 # Define entrypoint and command
 ENTRYPOINT ["/ros_entrypoint.sh"]
 CMD $EXT_SHELL
@@ -142,7 +138,7 @@ ENV DEBIAN_FRONTEND=
 FROM devenv as workspace-extended
 
 # Avoid warnings by switching to noninteractive
-ENV DEBIAN_FRONTEND=noninteractive
+ENV DEBIAN_FRONTEND noninteractive
 
 # Install extra packages ws_dependencies
 ARG PACKAGES=none
@@ -198,3 +194,7 @@ RUN apt-get update \
 
 # Switch back to dialog for any ad-hoc use of apt-get
 ENV DEBIAN_FRONTEND=
+
+# Define entrypoint and command
+ENTRYPOINT ["/ros_entrypoint.sh"]
+CMD $EXT_SHELL
diff --git a/dockerfiles/ros_entrypoint.sh b/dockerfiles/ros_entrypoint.sh
index af538a0ec76520cac29dd045a0bf73f80b6fe14b..f1dbf0a3d0bfcd0d93ba3fa0a9baf32c4b977f81 100644
--- a/dockerfiles/ros_entrypoint.sh
+++ b/dockerfiles/ros_entrypoint.sh
@@ -1,15 +1,4 @@
 #!/usr/bin/env bash
 
-# Check if the shell is Bash or Zsh
-if [ -n "$BASH_VERSION" ]; then
-    # Bash
-    source "/opt/ros/$ROS_DISTRO/setup.bash"
-elif [ -n "$ZSH_VERSION" ]; then
-    # Zsh
-    source "/opt/ros/$ROS_DISTRO/setup.zsh"
-else
-    echo "Unknown shell. This script is designed for Bash and Zsh."
-    return 1
-fi
-
+source "/opt/ros/$ROS_DISTRO/setup.bash"
 exec "$@"