question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error using docker image on Gitlab

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
hpatoiocommented, Sep 18, 2020

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

stages:
  - validate

validate_open-api:
  stage: validate
  image:
    name: stoplight/spectral
    entrypoint: [""]
  script:
   - spectral lint open-api.json
0reactions
nulltokencommented, Sep 18, 2020

@hpatoio Awesome!

Would you feel like sharing this more widely and open a PR to update /docs/getting-started/2-installation.md?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found