Skip to content

Commit f69380f

Browse files
author
Alexander Batashev
authored
[CI] Correctly create user in Docker containers (#4839)
By default Ubuntu sets an arbitrary UID value, that is different from host system. When CI passes default UID value of 1001, some of LLVM tools fail to discover user home directory. As a result, a few LITs fail. This patch fixes UID and GID to those, that are used by GitHub Actions by default.
1 parent b24b3a8 commit f69380f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

devops/containers/ubuntu2004_base.Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ RUN apt update && apt install -yqq \
1414
python3-distutils \
1515
python-is-python3
1616

17-
RUN adduser --disabled-password --gecos '' sycl
17+
# By default Ubuntu sets an arbitrary UID value, that is different from host
18+
# system. When CI passes default UID value of 1001, some of LLVM tools fail to
19+
# discover user home directory and fail a few LIT tests. Fixes UID and GID to
20+
# 1001, that is used as default by GitHub Actions.
21+
RUN groupadd -g 1001 sycl && useradd sycl -u 1001 -g 1001 -m -s /bin/bash
1822

1923
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
2024

0 commit comments

Comments
 (0)