2017-06-16 16:33:28 -05:00
|
|
|
# Parameters related to building hip
|
|
|
|
|
ARG base_image
|
|
|
|
|
|
|
|
|
|
FROM ${base_image}
|
2018-08-27 10:22:42 +05:30
|
|
|
MAINTAINER Maneesh Gupta <maneesh.gupta@amd>
|
2017-06-16 16:33:28 -05:00
|
|
|
|
|
|
|
|
ARG user_uid
|
|
|
|
|
|
2017-07-14 17:28:16 -05:00
|
|
|
# docker pipeline runs containers with particular uid
|
2017-06-16 16:33:28 -05:00
|
|
|
# create a jenkins user with this specific uid so it can use sudo priviledges
|
|
|
|
|
# Grant any member of sudo group password-less sudo privileges
|
2018-08-27 10:22:42 +05:30
|
|
|
RUN useradd --create-home -u ${user_uid} -G sudo,video --shell /bin/bash jenkins && \
|
2017-06-16 16:33:28 -05:00
|
|
|
mkdir -p /etc/sudoers.d/ && \
|
|
|
|
|
echo '%sudo ALL=(ALL) NOPASSWD:ALL' | tee /etc/sudoers.d/sudo-nopasswd
|