Feeling overwhelmed by AI? Learn the Centaur Mindset. Read More

Automatically Rebuild Image on Docker Hub

This post focuses on me being lazy. In the previous post, I talked about building a custom image and posting it to the Docker Hub. I have also talked about creating a Git repo and storing everything in it thus far. What if we could make a commit rebuild our image for us? As luck would have it, you can do this! This post is going to focus on making that very simple change to your Docker Hub repository so that every commit causes the image to be rebuilt to the latest. How fun! ...

January 18, 2020 · 3 min · Scott

Posting a Custom Image to Docker Hub

Welcome to 2020! I hope the new year finds everyone in good spirits and ready to continue listening to me babble about my struggles with technology. So far, the focus has been on using default Docker images for our builds. This is great if you plan to deploy stock instances and only need to serve custom content with some minor configuration tweaks. Note that we were able to make configuration changes using a configMap yaml. What if you needed Nginx modules that weren’t already installed in the base image? Sure, you could come up with some funky CMD statement in your yaml file that tells Kubernetes to install the modules. Of course, that’ll take some time for the pod to be available while it boots up and runs through the install steps. This will also defeat the purpose of what I’m attempting to show you too 🙂 ...

January 5, 2020 · 8 min · Scott

Deploying Nginx + PHP + git-sync on Kubernetes

In my previous post, I explained how to setup a simple nginx instance that could be used to sync to a private Git repo. The only drawback is that this setup will only serve static pages. What if you wanted to be able to run a server with dynamic code like PHP? I’m glad you asked! In this post, we’ll update our config to include a php-fpm instance to allow us to serve PHP pages. ...

December 30, 2019 · 6 min · Scott

Building a Kubernetes Container That Synchs with Private Git Repo

My previous post explained how to create a private git repo. On its own, that post is roughly useless unless you planned to maintained some private copy of your project so nobody can see it. In this post, we’re going to put that private repo to use in a Kubernetes environment. A basic assumption is that you already have a Kubernetes environment setup. Adding Another SSH Key to the Repo The first step would be to add another SSH Key to our repo. The purpose of this key is to be used to configure access from the container to the repo. We’ll load the SSH key into Kubernetes as a secret. We can’t set a password on this key or we might get prompted for the password during container build and that’s not useful. Also, since the key will not have a password, we won’t give it Read / Write access to our repo. ...

December 26, 2019 · 10 min · Scott

Creating a Private GitHub Repo

The first step in my adventure was to first create a location to store my web content. The mostly likely location for this was GitHub. The process for signing up for a GitHub account is pretty easy so I won’t bother going through that process here. I’m going to assume that you figured that part out and I will begin with that assumption. Setting Up a Private GitHub Repo Once you have your account, you’ll need to next setup your very first repo. Login to GitHub and click on the “New” button to create a repo On the resulting screen: 1. Enter a name for your repo 2. Enter a description if you like 3. We’re creating a private repo here because we don’t want anyone messing with it or having access to it (more on that in a future post). 4. Let’s also initialize the repo with a blank README. This way you can add notes to the repo later if you have anything specific to remind yourself of ...

December 20, 2019 · 8 min · Scott