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

Docker image in Gitlab-CI crashes with error: FormatException: Could not find an option or flag "-c" #85

Open
mfaure opened this issue Sep 2, 2021 · 2 comments

Comments

@mfaure
Copy link

mfaure commented Sep 2, 2021

I built a docker image with the Dockerfile, uploaded it on Gitlab.com to use it in a CI.

When called, the container crashes with the following error:

Using docker image sha256:577d2a684afdce94a8c645ca02a2d8b11e416234ec68ff16e6fc0cfdc9f29503 for registry.gitlab.com/asqatasun/documentation/linkcheck:2.0.19 with digest registry.gitlab.com/asqatasun/documentation/linkcheck@sha256:1d21238b78a76c48de7594432fde3af2d28fa07b19e5abb4b13f93f2b9215254 ...
INTERNAL ERROR: Sorry! Please open https://github.com/filiph/linkcheck/issues/new in your favorite browser and copy paste the following output there:
FormatException: Could not find an option or flag "-c".
#0      Parser._validate (package:args/src/parser.dart:309:21)
#1      Parser._handleSoloOption (package:args/src/parser.dart:146:7)
#2      Parser._parseSoloOption (package:args/src/parser.dart:139:12)
#3      Parser.parse (package:args/src/parser.dart:84:11)
#4      ArgParser.parse (package:args/src/arg_parser.dart:335:42)
#5      run (package:linkcheck/linkcheck.dart:206:29)
#6      main.<anonymous closure> (file:///root/.pub-cache/hosted/pub.dartlang.org/linkcheck-2.0.19/bin/linkcheck.dart:11:22)
#7      main.<anonymous closure> (file:///root/.pub-cache/hosted/pub.dartlang.org/linkcheck-2.0.19/bin/linkcheck.dart:9:25)
#8      _rootRun (dart:async/zone.dart:1354:13)
#9      _CustomZone.run (dart:async/zone.dart:1258:19)
#10     _runZoned (dart:async/zone.dart:1789:10)
#11     runZonedGuarded (dart:async/zone.dart:1777:12)
#12     main (file:///root/.pub-cache/hosted/pub.dartlang.org/linkcheck-2.0.19/bin/linkcheck.dart:9:9)
#13     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:281:32)
#14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Cleaning up file based variables
ERROR: Job failed: exit code 2

(Locally, the docker image works fine.)

As I was invited to create an issue, I did it :)

@mfaure
Copy link
Author

mfaure commented Sep 2, 2021

More information:

I created a different docker image for LinkCheck based on Ubuntu:18.04 instead of google/dart. I had the same issue.

See full log at Job #1557902363

@tennox
Copy link
Contributor

tennox commented Dec 1, 2021

The docker image sets an entypoint, which is required to be empty for gitlab CI. overwrite like this:

image:
  name: filiph/linkcheck
  entrypoint: ['']

/close

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