Open Source Contribution Workflow Best Practice

Ggicci
Generally speaking, as we were using some open-source libraries we will inevitably find that there are some bugs or points that can be improved. And sometimes we even have to develop a brand new feature based on these libraries to satisfy our own needs. Out of respect for sprit of dedication, contributing our code to these opensource libraries is a good way to give back to the community. My Practice When I decided to contribute to a repository, I will first try looking for if there is a contribution guide for it.

Reduce Docker Image Size by Using Multi-stage Builds

Ggicci
If you don’t take any optimization measures, docker images can easily get large. And in most cases we just wrapped too many inessential things into the images. So, we should take actions to get rid of it. Let’s take a look at a common example Dockerfile for building an application written in Go. FROMgolang:1.10.2-stretch WORKDIR/go/src/github.com/ggicci/docker-example-server COPY . . RUN go install LABEL \ me.ggicci.appdemo.image.created="2006-01-02T15:04:05+08:00" \ me.ggicci.appdemo.image.version="1.0.0" # (and more) WORKDIR/app ENTRYPOINT [ "docker-example-server" ] EXPOSE8080 After building the image by running command docker build -t example:1.