-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
gcl-cmd throws '1: set: Illegal option -o pipefail' when entrypoint is set to '/bin/bash -c' #952
Comments
I'm getting this, when trying your example on a "real" gitlab runner Have you tested this on a real gitlab runner ? @tan-wei-xin-alez |
Here is a single file example, reproducing the issue. ---
build:
stage: build
script: |
docker build -t testhest - <<EOF
FROM python:3
ENTRYPOINT [ "/bin/bash", "-c" ]
EOF
test-job:
image: testhest
script:
- echo 'test' |
@firecow oh that's strange, it seems to work fine when I use my repos registry ![]() This is the python image I'm using
My docker version
Dockerfile is the same as mentioned above, built and pushed it to registry with the following commands
Then pushed the following .gitlab-ci.yml to run the job
Does it matter that I'm using gitlab's kubernetes executor which has runner version 16.1.0? |
Perhaps.. I'll have to investigate further on our selfhosted gitlab.. |
---
build-job:
tags: [shared-shell-executor]
script:
- |
docker build -t registry.example.com/debug:${CI_PIPELINE_IID} -f - . <<EOF
FROM python:3
ENTRYPOINT [ "/bin/bash", "-c" ]
EOF
- docker push registry.example.com/debug:${CI_PIPELINE_IID}
test-job:
tags: [shared-docker-executor]
needs: [build-job]
image: registry.example.com/debug:${CI_PIPELINE_IID}
script:
- echo "test" I'm getting an error, but it's not the same as |
I'm using a docker-executor, you are using a kubernetes executor. |
Sorry if this is an obvious question, I am not very familiarized with GitLab. As my organization also uses Kubernetes executor, I cannot test this. Thanks for your time. You are saying that the docker executor cannot read an entrypoint in a gitlab-ci yml file? I have the following example and it throws the same error:
|
Minimal .gitlab-ci.yml illustrating the issue
The above throws the following error
for the following Dockerfile
but succeeds when the
ENTRYPOINT
line is removedExpected behavior
Should succeed without an issue like below
Host information
➜ uname -srvmo Linux 5.15.0-75-generic #82~20.04.1-Ubuntu SMP Wed Jun 7 19:37:37 UTC 2023 x86_64 GNU/Linux ➜ gitlab-ci-local --version 4.42.0
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: