Update Dockerfile and remove entrypoint
I've updated and modified Dockerfile a bit, nothing here is necessary a "fix" but IMHO it is a little better now.
- newer Alpine linux release
- smaller image with no dev tools: < 22MiB versus the previous 218MiB
- remove ENTRYPOINT, removing the need to override it in CI scripts
- update README accordingly
Please note the ENTRYPOINT change will break compatibility with scripts made for the previous Docker images, IMHO this is for the better.
Thanks!
This seems sane to me. One would hope people specify a version of the docker container, so I'm not overly worried about the breaking change... but can you tell me how to validate ruby-concurent-ruby has the etc module in it?
Also you have some test failures. :)
@jaymzh I'm using apk packages so any dependency should have been taken care of by the packager.
In this case it is not installing ruby-etc and mdl seems to be running just fine from the generated container image, I guess etc is not really needed.
For my local development I usually run some smoke tests in CI on the generated images, eg. to check that mdl --version or mdl SomeTestFile.md run correctly, so I can be sure there is nothing missing. At the very minimum, just doing a docker build on your local machine and testing the resulting image should be enough.
Also, speaking about tags, it is possible to automate builds on the docker hub triggered from github tags and do your own custom tagging after the build: you can look at an example in this unrelated repo and I can put together a PR for markdownlint if you are interested.
Regarding the test failures, seems like rubocop is just complaining about old unsupported ruby versions, it is probably unrelated to my PR (please note that recent Alpine releases are using ruby 2.7).
https://github.com/markdownlint/markdownlint/pull/387 will fix the tests.
I'd super appreciate the auto build-and-tag of docker images based on our tags!
I would like to use this image in my GitLab pipelines, so a smaller version without an entrypoint like this would be highly appreciated. Is there any update on this?
My current workaround is overwriting the entrypoint like this:
lint-markdown:
image:
name: markdownlint/markdownlint:0.11.0
entrypoint: [""]
script:
- mdl README.md
stage: lint
Oh sorry, dropped off my radar.
@lesinigo - can you rebase and make sure the tests pass? Then I'll merge.
And I would love a PR for the autobuilds.
Ping, @lesinigo ?
Ping @lesinigo
No response for a year, closing.