Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify USER not working with gitlab CI docker executor #95

Open
ebuildy opened this issue Dec 3, 2021 · 1 comment
Open

Specify USER not working with gitlab CI docker executor #95

ebuildy opened this issue Dec 3, 2021 · 1 comment

Comments

@ebuildy
Copy link

ebuildy commented Dec 3, 2021

When using this image , with gitlab CI docker executor, I got the error:

[INFO] Running container with user 'ansible'
[INFO] Adjusting local user with uid:999 and gid:1000
[INFO] Adjusting ownership on directory: ~/.gnupg/
[INFO] Adjusting ownership on directory: ~/.ssh/
[INFO] ansible> sh -c if [ -x /usr/local/bin/bash ]; then
	exec /usr/local/bin/bash 
elif [ -x /usr/bin/bash ]; then
	exec /usr/bin/bash 
elif [ -x /bin/bash ]; then
	exec /bin/bash 
elif [ -x /usr/local/bin/sh ]; then
	exec /usr/local/bin/sh 
elif [ -x /usr/bin/sh ]; then
	exec /usr/bin/sh 
elif [ -x /bin/sh ]; then
	exec /bin/sh 
elif [ -x /busybox/sh ]; then
	exec /busybox/sh 
else
	echo shell not found
	exit 1
fi
bash: -c: line 1: syntax error near unexpected token `then'
bash: -c: line 1: `sh -c if [ -x /usr/local/bin/bash ]; then'

This is because the bootstrap gitlabCI script: https://gitlab.com/gitlab-org/gitlab-runner/-/blob/main/shells/bash.go#L18-37

@cytopia
Copy link
Owner

cytopia commented Nov 12, 2022

Not sure about this, but /bin/sh is installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants