services run as root instead of container user
bug
**Minimal .gitlab-ci.yml illustrating the issue**
```yml
---
stages:
- test
print-user:
stage: test
services:
- name: elasticsearch:8.17.0
command: ["whoami"]
script:
- echo "bye"
```
**Expected behavior**
https://gitlab.com/petervv/gitlab-ci-test/-/jobs/13284221178#L36
**Host information**
Ubuntu 22.04
gitlab-ci-local 4.67.1
**Containerd binary**
docker
**Additional context**
User in gitlab service is `elasticsearch` as it in the elasticsearch container. In gitlab-ci-local it's root.
```
$ docker inspect elasticsearch:8.17.0 | jq -r .[].Config.User
```
Yields `1000:0`
Here's a minimum reproducible repository: https://github.com/peterbbeu/gitlab-ci-local-testcase/tree/a763a0a0e67d15b29d7a755e9578711913252502
Here is the associated pipeline that demonstrates it: https://github.com/peterbbeu/gitlab-ci-local-testcase/actions/runs/22461040729/job/65055085246#step:8:7
1 条评论