Skip to content

Commit

Permalink
Scape $USER in Dockerfile to avoid bash expansion
Browse files Browse the repository at this point in the history
Keep Dockerfile variables in placce. Should help with the local
reproducibility.

Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
  • Loading branch information
j-rivero committed Jun 29, 2023
1 parent 930d33c commit d924412
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jenkins-scripts/docker/lib/docker_generate_dockerfile.bash
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN chown -R \$USER:\$USER /home/\$USER
# permit access to USER variable inside docker
ENV USER ${USER}
USER $USER
ENV USER \$USER
USER \$USER
# Must use sudo where necessary from this point on
DELIM_DOCKER_USER

Expand Down

0 comments on commit d924412

Please sign in to comment.