mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-21 17:34:31 +00:00
Merge pull request #7749 from fidencio/topic/CC-backport-fix-to-allow-building-the-images
CC | Backport | local-build: Remove GID before creating group
This commit is contained in:
commit
dfb38245e7
@ -28,7 +28,7 @@ ARG GID=1000
|
||||
# gid of the docker group on the host, required for running docker in docker builds.
|
||||
ARG HOST_DOCKER_GID
|
||||
|
||||
RUN if [ ${IMG_USER} != "root" ]; then groupadd --gid=${GID} ${IMG_USER};fi
|
||||
RUN if [ ${IMG_USER} != "root" ]; then sed -i -e "/:${GID}:/d" /etc/group; groupadd --gid=${GID} ${IMG_USER};fi
|
||||
RUN if [ ${IMG_USER} != "root" ]; then adduser ${IMG_USER} --uid=${UID} --gid=${GID};fi
|
||||
RUN if [ ${IMG_USER} != "root" ] && [ ! -z ${HOST_DOCKER_GID} ]; then groupadd --gid=${HOST_DOCKER_GID} docker_on_host;fi
|
||||
RUN if [ ${IMG_USER} != "root" ] && [ ! -z ${HOST_DOCKER_GID} ]; then usermod -a -G docker_on_host ${IMG_USER};fi
|
||||
|
Loading…
Reference in New Issue
Block a user