Skip to content

Commit

Permalink
Delete any existing UID user in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rkent committed Jul 12, 2024
1 parent f068f74 commit 77deb1f
Show file tree
Hide file tree
Showing 25 changed files with 99 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
5 changes: 4 additions & 1 deletion ros_buildfarm/templates/ci/ci_create_tasks.Dockerfile.em
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
5 changes: 4 additions & 1 deletion ros_buildfarm/templates/ci/create_workspace.Dockerfile.em
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@[if require_gpu_support]@
@(TEMPLATE(
Expand Down
5 changes: 4 additions & 1 deletion ros_buildfarm/templates/devel/devel_task.Dockerfile.em
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/setup_nvidia_docker2.Dockerfile.em'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
5 changes: 4 additions & 1 deletion ros_buildfarm/templates/doc/doc_create_task.Dockerfile.em
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
5 changes: 4 additions & 1 deletion ros_buildfarm/templates/doc/doc_metadata_task.Dockerfile.em
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
5 changes: 4 additions & 1 deletion ros_buildfarm/templates/doc/doc_task.Dockerfile.em
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/set_environment_variables.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
5 changes: 4 additions & 1 deletion ros_buildfarm/templates/doc/rosdoc2_task.Dockerfile.em
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ ENV DEBIAN_FRONTEND noninteractive
))@


RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ ENV DEBIAN_FRONTEND noninteractive
bazelrc_dir='/etc',
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Add user 'buildfarm', removing any existing user with that UID
RUN if [ $(id -nu @(uid)) ]; then userdel -r $(id -nu @(uid)); fi
RUN useradd -u @(uid) -l -m buildfarm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ENV DEBIAN_FRONTEND noninteractive
timezone=timezone,
))@

RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_buildfarm_user.Dockerfile.em',
uid=uid,
))@

@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
Expand Down

0 comments on commit 77deb1f

Please sign in to comment.