Weekend Project: Creating first custom docker image and pushing to private repository

This weekend with all of my devices packed away, I decided to focus on something I have been meaning to learn more about, Docker. I have used Docker and containers for going on two years. The most that I did was deploying a few containers and manage the application from said container. For example NextCloud was hosted inside of a Docker container on my Raspberry Pi.

With this weekend project I was able to dive a bit deeper. For the last 6 months I had been running a personal password vault I developed in Python. Nothing fancy but it did the job. The Python program would interact with a backend MySQL server to store the account, username and password. The account and username was stored in plaintext whereas the password would be stored as a hash. The only way to restore this password to its original state would require the password to be entered and if it matched it would inform the user (me) a match has been found.

Although it worked, it did not serve the original purpose that I had in mind. I still had to remember the password in order to get the password. Well I decided a better way to do this was use an asymmetric key pair to encrypt/decrypt the password. As long as I have the private key I can then decrypt it. Awesome. Well this weekend I wanted to improve this program but then realized my backend SQL database was hosted on my server I just packed away. That is where I came up with the idea of my weekend project.

Instead of directly hosting a MySQL server on laptop to update the code I figured I could user docker to easily spin up a SQL database and go from there. Then I thought maybe I can use this as a more permanent solution even allowing me to deploy on other machines for maybe family or friends. Which is why I decided to learn about publishing my own custom Docker image for this particular purpose.

So now I have a custom image hosted in DockerHub allowing me to Docker pull this image from anywhere in the world and have a solution up and running within minutes. Soon I will do a writeup of how I went about this, allowing others to replicate my process and hopefully learn a thing or two. I will also do another instructional post covering the Python code but in the mean time can be reviewed on my Github, https://github.com/CyberMe-Jack/Python/blob/main/pVault.

Until next time, Never Stop Learning!