Skip to content

Commit 70a31a2

Browse files
committed
Use USER_UID instead of USERNAME
1 parent 97fe485 commit 70a31a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RUN apt-get update && apt-get install -y \
3838
RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
3939
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
4040

41-
RUN apt update -y
41+
RUN apt update -y
4242

4343
RUN apt install -y ros-humble-ros-gzharmonic
4444

@@ -50,7 +50,7 @@ RUN apt-get update && \
5050
apt-get update
5151

5252
# Change user
53-
RUN chown $USERNAME:$USERNAME /workspace/$USERNAME
53+
RUN chown $USER_UID:$USER_GID /workspace/$USERNAME
5454

5555
USER $USERNAME
5656

@@ -63,4 +63,4 @@ COPY --chown=$USERNAME ./ /workspace/$USERNAME
6363
RUN rosdep update
6464
# Copy to preload the ros packages
6565

66-
RUN rosdep install --from-paths src --ignore-src --rosdistro humble -y
66+
RUN rosdep install --from-paths src --ignore-src --rosdistro humble -y

0 commit comments

Comments
 (0)