hhatto / gocloc

A little fast cloc(Count Lines Of Code)
MIT License
803 stars 81 forks source link

Add Dockerfile with linting and testing #36

Closed dbast closed 4 years ago

dbast commented 4 years ago

Container size is minimized by the ldflags (which strip debugging symbols) and compressing via upx.

After merging the PR, it would be nice if the dockerhub cloud builder could be activated to upload to image to Dockerhub for master=latest and $tags.

This then allows to use gocloc e.g. on CI via: docker run -v ${PWD}:/workdir hhatto/gocloc . or docker run -v ${PWD}:/workdir hhatto/gocloc:$VERSION . (instead of wget $release && $hashcheck && tar -xf .. && chmod +x .. && gocloc .).

Thanks!

hhatto commented 4 years ago

I'll be uploading packages to Dockerhub and GitHub Packages in the near future.

dbast commented 4 years ago

Ping: Any update on uploading the Docker Image to Dockerhub?

hhatto commented 4 years ago

@dbast Sorry for the delay.

I uploaded the package to GitHub Packages and Docker Hub. It's the same image for both.

https://github.com/hhatto/gocloc/packages/350535 https://hub.docker.com/r/hhatto/gocloc

I'd be very grateful if you could let me know if there are any problems.

Thanks

dbast commented 4 years ago

Works, thanks!