AlDanial / cloc

cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.
GNU General Public License v2.0
19.78k stars 1.02k forks source link

Latest Docker Image is broken #703

Closed CodeMan99 closed 1 year ago

CodeMan99 commented 1 year ago

Describe the bug

$ docker run --rm -v $PWD:/tmp aldanial/cloc:latest HEAD
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "HEAD": executable file not found in $PATH: unknown.

This seems to stem from the change to drop ENTRYPOINT and instead use CMD. The following works as expected.

$ docker run --rm -v $PWD:/tmp --entrypoint /usr/src/cloc aldanial/cloc:latest HEAD
AlDanial commented 1 year ago

Thanks for reporting this. I wish I were more docker-savvy, looks like I'll have to revert the older commit, will do a bit of docker 101 first.

AlDanial commented 1 year ago

@Treehopper your PR #679 forces the use of --entrypoint on the command line. Is there a way to achieve what you need on Windows without removing the ENTRYPOINT definition in Dockerfile?

AlDanial commented 1 year ago

@Treehopper hope to hear from you soon. I'll revert the commit in your PR this weekend if there's no work-around.

AlDanial commented 1 year ago

I updated the images at docker.io.

nre-ableton commented 1 year ago

It looks like the 1.96 tag was replaced by a newer image after this PR was merged. In the future, could you please push a new version tag instead of overwriting existing tags? This broke some of our CI builds and we had to revert to 1.94. Thanks, and keep up the good work! 👍 🙏

AlDanial commented 1 year ago

@nre-ableton sorry about that! I think I've made about every possible mistake with Docker there is to make. (Actually, when I think about it I'm probably underestimating myself there.) At least this particular mistake won't be repeated.

nre-ableton commented 1 year ago

@AlDanial It's no problem, as I said, we have a workaround in place. Just something to keep in mind for future releases!

gute-kunst commented 1 year ago

@AlDanial hey, I it seems like the "latest" tagged image was not overwritten. Therefore the bug still persists when pulling aldanial/cloc.

AlDanial commented 1 year ago

@gute-kunst I just re-pushed latest , let me know if you're not getting 1.96 from that.