From the course: Automating Kubernetes with GitOps

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Creating a GitOps container image

Creating a GitOps container image - Kubernetes Tutorial

From the course: Automating Kubernetes with GitOps

Creating a GitOps container image

- All right, so now that we know a bit about Dockerfile, let's use this knowledge to build a GitOps container image. Now, why do we want to do that? Well, I want to do that because container images are developed to be small, and as a result it may be hard to find an image that has all the tools that you need. And that is why I would like to create a GitOps container image. We do that based on an example that I have in the course Git repository. In the Subdirectory GitOps tool, you will find the Dockerfile that I'm going to use. Here are the steps to learn, let me show you. Okay, so in the GitOps tools directory, we find the Dockerfile. It's just a simple Dockerfile. And what do we do? Well from Alpine Maintainer, that will be me, and learn what, are we learning? Well, APK add curl in Git. Next, I'm using curl to to fetch kubectl. That's not something that you can easily install using APK. And it copies the kubectl utility to use a local bin kubectl and it uses chmod + X to make it…

Contents