filiph/linkcheck

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

Opened this issue · 2 comments

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 :)

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

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

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

/close