Open derhasi opened 8 years ago
Interesting, perhaps it's running a show command with -c
in there?
I am successfully using this container in a Drone CI setup, so I am thinking GitLab is most assuredly doing something funky here ^_^
It has to be project independent, as I run the same .gitlab-ci.yml
on an empty project. The only "script" that is/will be called is ls
. So I do not know where the composer show
command is coming from.
I'm seeing this same issue. This is all I have for the composer
part of my build:
composer:
stage: build
image: composer/composer
artifacts:
paths:
- vendor/
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- vendor/
script:
- install --prefer-dist
gitlab-ci requires that used images provide a shell entry point as the runner build a bash script to be run into the container.
IMO it is Gitlab-CI that should adapts itself to how Docker image works and not the other way around.
Most of the available images uses a CMD directive pointing directly to a binary and you cannot asks for every single one of them to changes this behavior in order to be compliant to how Gitlab-CI works.
On that matter, there is still an opened discussion on their repo.
For now the best approach to solve this problem would be to create a new image with composer as its base and change the entrypoint by a script as stated in the PR #116.
Even though the project is discontinued: Starting with GitLab (Runner) 9.4 it is possible to override the entrypoint:
image:
name: composer/composer:php5-alpine
entrypoint: [""]
so that the image can be used with GitLab CI.
When trying to use
composer/composer:php5-alpine
in Gitlab CI, there is some odd error occuring:The
.gitlab-ci.yml
looks like this:and creates a build output like this: