Using a multi-Stage Dockerfile
Use a multi-stage Dockerfile to dockerize multi-git and create a Docker image that can be run on any system that has Docker support.
We'll cover the following
Using a multi-stage Dockerfile
One of the main benefits of Docker is that it can potentially create very small images, which require less resources and are more secure due to the small surface area. In the previous section, you saw that we can build a 10MB multi-git executable. However, building it requires a lot of foundation. Here is a simple Dockerfile based on the golang:1.14 base image that builds multi-git. I saved it as Dockerfile.big
:
Get hands-on with 1400+ tech skills courses.