Hi, Today we’re going to look at some awesome docker tools! Let’s get right to it!
Dive is a cool tool, it allows you to “dive” into a docker image and see info about file size, and structure in your image, It also allows you to see exactly what file changes occured in all layers of the image.
Example of an inspected image.
In this example, you can see some crucial details, for example, the total image size, and the estimated amount of waisted space.
In this case, we’re using the
node:13-alpine image as a base, so most of the wasted space is in their image (removing things later on would not help, as these changes were in earlier layers.)
On the right side, you can see all additions (green) and removals (red) that have happened in this layer, for this layer, we used a copy command to copy files from a build image into our new, smaller image.
You can find more info about dive (and how to install it) on Github.
Kaniko is an application that let’s you build a docker image in docker, without dind (Docker-in-Docker.)
It’s speed is a lot better than using dind, as it isn’t using the docker socket to build the image.
I’m right now trying to convert projects I work on to kaniko!
You can find an example
.gitlab-ci.yml file here
You can find the project here (Github).
Not really a tool for docker, but it can run docker images on your servers,
Super useful if you already use saltstack for deploying servers and applications.
I’ve not seen it around a lot, but it’s seriously a good tool to deploy things on your servers.
For example, I’ve got an application server that runs some stuff I want in my house, Influx (+Telegraf on all my VM’s) runs on this one.
Here’s an example of how to run Influx on a server:
Here we use the
docker_container.running state to setup a container (influxdb on quay.io) to run on a specific port.
I won’t go into the specifics, but a lot of it is self-explanatory, and uses some syntax you also see in docker cli.
Gitlab Container Registry
A private (or public, depending on your usecase) container registry, built right into Gitlab.
A very easy to use platform to get your containers on, if you don’t want your applications hosted on external servers (Dockerhub, Quay, etc.)
Here‘s a link on how to set up the registry.
That’s it from me today, next time, we’ll talk about some cool tools for Kubernetes. Stay tuned!