Error using docker image on Gitlab
See original GitHub issueDescribe the bug When running with the docker image on Gitlab, it throws an error saying
Unknown arguments: c, sh
To Reproduce
I have the config set up as follows:
stages:
- lint
lint:
stage: lint
image: stoplight/spectral
script:
- spectral lint ./*.yaml
Expected behavior it Shoudn’t crash
Environment (remove any that are not applicable):
- Giltab runner version : 12.1.0
Additional context Here’s the whole log
Running with gitlab-runner 12.1.0 (de7731dd)
on Autoscalling runner 8a6fef31
Using Docker executor with image stoplight/spectral ...
Pulling docker image stoplight/spectral ...
Using docker image sha256:1138f1564cd3ae6b28b639d00b4ecde1f7c1013436f76fd8622b07c5892790a2 for stoplight/spectral ...
Running on runner-8a6fef31-project-661-concurrent-0 via runner-8a6fef31-gitlab-docker-machine-1590659054-9111b302...
Fetching changes with git depth set to 50...
Initialized empty Git repository in [REDACTED]
Created fresh repository.
From [REDACTED]
* [new ref] refs/pipelines/9489 -> refs/pipelines/9489
* [new branch] develop -> origin/develop
Checking out 8d691582 as develop...
Skipping Git submodules setup
spectral <command>
Commands:
spectral lint [documents..] lint JSON/YAML documents from files or URLs
Options:
--version Show version number [boolean]
--help Show help [boolean]
Unknown arguments: c, sh
ERROR: Job failed: exit code 1
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
GitLab Docker images
The GitLab Docker images are monolithic images of GitLab running all the ... This error occurs when using Docker Toolbox with VirtualBox on...
Read more >Troubleshooting the GitLab Container Registry
A Docker connection error can occur when there are special characters in either ... The images in your GitLab Container Registry must use...
Read more >Pulling Docker image from GitLab Container Registry stopped ...
Now, for some reason, I see an error in one project when it tries to pull the docker image: Failed to pull image...
Read more >Gitlab-runner fails to pull image from docker registry for ...
In this pipeline, the job use-docker-19-from-project-registry is failing when the docker+machine executor is trying to pull the image for the ...
Read more >Preparation failed: Error: No such image (#218331) - GitLab
The error message seems to indicate there is no such image, however, you can pull the image directly on a local machine without...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I stumbled into this issue too. After reading here https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2692#note_50147081 I was able to successfully use the official image with this yml
@hpatoio Awesome!
Would you feel like sharing this more widely and open a PR to update
/docs/getting-started/2-installation.md
?